diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index d241fdf..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -13,7 +13,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index d241fdf..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index d241fdf..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index d241fdf..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index d241fdf..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/examples/example 7 - Transparent Background/index.html b/examples/example 7 - Transparent Background/index.html index 6c9bdb8..a76d39c 100644 --- a/examples/example 7 - Transparent Background/index.html +++ b/examples/example 7 - Transparent Background/index.html @@ -26,25 +26,21 @@ blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah diff --git a/docs/classes/AjaxRequest.html b/docs/classes/AjaxRequest.html new file mode 100644 index 0000000..de6dba2 --- /dev/null +++ b/docs/classes/AjaxRequest.html @@ -0,0 +1,926 @@ + + + + + AjaxRequest - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index d241fdf..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/examples/example 7 - Transparent Background/index.html b/examples/example 7 - Transparent Background/index.html index 6c9bdb8..a76d39c 100644 --- a/examples/example 7 - Transparent Background/index.html +++ b/examples/example 7 - Transparent Background/index.html @@ -26,25 +26,21 @@ blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah diff --git a/examples/example 8 - Dragging/index.html b/examples/example 8 - Dragging/index.html index 934f671..1cadbc7 100644 --- a/examples/example 8 - Dragging/index.html +++ b/examples/example 8 - Dragging/index.html @@ -14,9 +14,8 @@ + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

AjaxRequest Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Utils.js:99 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

A wrapper for ajax requests to be handled cross browser

+ +
+ + +
+

Constructor

+
+

AjaxRequest

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:99 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

bind

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:71 + +

+ + + + + +
+ +
+

A polyfill for Function.prototype.bind

+ +
+ + + + + + +
+ + +
+

cancelAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:19 + +

+ + + + + +
+ +
+

A polyfill for cancelAnimationFrame

+ +
+ + + + + + +
+ + +
+

canUseNewCanvasBlendModes

+ + + () + + + + + Boolean + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:159 + +

+ + + + + +
+ +
+

Checks whether the Canvas BlendModes are supported by the current browser

+ +
+ + + + +
+

Returns:

+ +
+ + + Boolean: + +

whether they are supported

+ + +
+
+ + + +
+ + +
+

getNextPowerOfTwo

+ + +
+ (
    + +
  • + + number + +
  • + +
) +
+ + + + + Number + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:179 + +

+ + + + + +
+ +
+

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:

+ +
    + +
  • + + number + Number + + + + +
    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Number: + +

the closest number that is a power of two

+ + +
+
+ + + +
+ + +
+

hex2rgb

+ + +
+ (
    + +
  • + + hex + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:51 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + hex + Number + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

requestAnimationFrame

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:12 + +

+ + + + + +
+ +
+

A polyfill for requestAnimationFrame +You can actually use both requestAnimationFrame and requestAnimFrame, +you will still benefit from the polyfill

+ +
+ + + + + + +
+ + +
+

rgb2hex

+ + +
+ (
    + +
  • + + rgb + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Utils.js:61 + +

+ + + + + +
+ +
+

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

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + rgb + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasMaskManager.html b/docs/classes/CanvasMaskManager.html new file mode 100644 index 0000000..005cb9a --- /dev/null +++ b/docs/classes/CanvasMaskManager.html @@ -0,0 +1,511 @@ + + + + + CanvasMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used to handle masking

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

popMask

+ + +
+ (
    + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:39 + +

+ + + + + +
+ +
+

Restores the current drawing context to the state it was before the mask was applied

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + context + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasMaskManager.js:16 + +

+ + + + + +
+ +
+

This method adds it to the current stack of masks

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Object + + + + +
    +

    the maskData that will be pushed

    + +
    + + +
  • + +
  • + + context + Context2D + + + + +
    +

    the 2d drawing method of the canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/CanvasTinter.html b/docs/classes/CanvasTinter.html new file mode 100644 index 0000000..608462a --- /dev/null +++ b/docs/classes/CanvasTinter.html @@ -0,0 +1,1162 @@ + + + + + CanvasTinter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

CanvasTinter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

CanvasTinter

+ + + () + + + + + + + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:8 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getTintedTexture

+ + +
+ (
    + +
  • + + sprite + +
  • + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:21 + +

+ + + + + +
+ +
+

Basically this method just needs a sprite and a color and tints the sprite +with the given color

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

roundColor

+ + +
+ (
    + +
  • + + color + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:197 + +

+ + + + + +
+ +
+

Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + color + Number + + + + +
    +

    the color to round, should be a hex color

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintPerPixel

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:153 + +

+ + + + + +
+ +
+

Tint a texture pixel per pixel

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithMultiply

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:70 + +

+ + + + + +
+ +
+

Tint a texture using the "multiply" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

tintWithOverlay

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + color + +
  • + +
  • + + canvas + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:115 + +

+ + + + + +
+ +
+

Tint a texture using the "overlay" operation

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    the texture to tint

    + +
    + + +
  • + +
  • + + color + Number + + + + +
    +

    the color to use to tint the sprite with

    + +
    + + +
  • + +
  • + + canvas + HTMLCanvasElement + + + + +
    +

    the current canvas

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

cacheStepsPerColorChannel

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:215 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+

canUseMultiply

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:232 + +

+ + + + +
+ +
+

Whether or not the Canvas BlendModes are supported, consequently the ability to tint using the multiply method

+ +
+ + + + + + +
+ + +
+

convertTintToImage

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/canvas/utils/CanvasTinter.js:223 + +

+ + + + +
+ +
+

Number of steps which will be used as a cap when rounding colors

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/FilterTexture.html b/docs/classes/FilterTexture.html new file mode 100644 index 0000000..88ea237 --- /dev/null +++ b/docs/classes/FilterTexture.html @@ -0,0 +1,957 @@ + + + + + FilterTexture - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

FilterTexture Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

FilterTexture

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

clear

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:39 + +

+ + + + + +
+ +
+

Clears the filter texture

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:72 + +

+ + + + + +
+ +
+

Destroys the filter texture

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:52 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

resize

+ + +
+ (
    + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:51 + +

+ + + + + +
+ +
+

Resizes the texture to the specified width and height

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + width + Number + + + + +
    +

    the new width of the texture

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the new height of the texture

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:13 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:29 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js:15 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/StripShader.js:8 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionData.html b/docs/classes/InteractionData.html new file mode 100644 index 0000000..1ba854d --- /dev/null +++ b/docs/classes/InteractionData.html @@ -0,0 +1,640 @@ + + + + + InteractionData - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionData Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

Holds all information related to an Interaction event

+ +
+ + +
+

Constructor

+
+

InteractionData

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:5 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

getLocalPosition

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
) +
+ + + + + Point + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:41 + +

+ + + + + +
+ +
+

This will return the local coordinates of the specified displayObject for this InteractionData

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    The DisplayObject that you would like the local coords off

    + +
    + + +
  • + +
+
+ + + +
+

Returns:

+ +
+ + + Point: + +

A point containing the coordinates of the InteractionData position relative to the DisplayObject

+ + +
+
+ + + +
+ + +
+ + + +
+

Properties

+ + +
+

global

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:13 + +

+ + + + +
+ +
+

This point stores the global coords of where the touch/mouse event happened

+ +
+ + + + + + +
+ + +
+

originalEvent

+ Event + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:32 + +

+ + + + +
+ +
+

When passed to an event handler, this will be the original DOM Event that was captured

+ +
+ + + + + + +
+ + +
+

target

+ Sprite + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionData.js:24 + +

+ + + + +
+ +
+

The target Sprite that was interacted with

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/InteractionManager.html b/docs/classes/InteractionManager.html new file mode 100644 index 0000000..76727e5 --- /dev/null +++ b/docs/classes/InteractionManager.html @@ -0,0 +1,2065 @@ + + + + + InteractionManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

InteractionManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The interaction manager deals with mouse and touch events. Any DisplayObject can be interactive +if its interactive parameter is set to true +This manager also supports multitouch.

+ +
+ + +
+

Constructor

+
+

InteractionManager

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    The stage to handle interactions

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

collectInteractiveSprite

+ + +
+ (
    + +
  • + + displayObject + +
  • + +
  • + + iParent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:108 + +

+ + + + + +
+ +
+

Collects an interactive sprite recursively to have their interactions managed

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + displayObject + DisplayObject + + + + +
    +

    the displayObject to collect

    + +
    + + +
  • + +
  • + + iParent + DisplayObject + + + + +
    +

    the display object's parent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

hitTest

+ + +
+ (
    + +
  • + + item + +
  • + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:472 + +

+ + + + + +
+ +
+

Tests if the current mouse coordinates hit a sprite

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + item + DisplayObject + + + + +
    +

    The displayObject to test for a hit

    + +
    + + +
  • + +
  • + + interactionData + InteractionData + + + + +
    +

    The interactionData object to update in the case there is a hit

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseDown

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:350 + +

+ + + + + +
+ +
+

Is called when the mouse button is pressed down on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being pressed down

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:320 + +

+ + + + + +
+ +
+

Is called when the mouse moves across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of the mouse moving

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseOut

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:393 + +

+ + + + + +
+ +
+

Is called when the mouse button is moved out of the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being moved out

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onMouseUp

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:424 + +

+ + + + + +
+ +
+

Is called when the mouse button is released on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a mouse button being released

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchEnd

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:640 + +

+ + + + + +
+ +
+

Is called when a touch is ended on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch ending on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchMove

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:547 + +

+ + + + + +
+ +
+

Is called when a touch is moved across the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch moving across the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

onTouchStart

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:585 + +

+ + + + + +
+ +
+

Is called when a touch is started on the renderer element

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Event + + + + +
    +

    The DOM event of a touch starting on the renderer view

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setTarget

+ + +
+ (
    + +
  • + + target + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:151 + +

+ + + + + +
+ +
+

Sets the target for event delegation

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

setTargetDomElement

+ + +
+ (
    + +
  • + + domElement + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:172 + +

+ + + + + +
+ +
+

Sets the DOM element which will receive mouse/touch events. This is useful for when you have other DOM +elements on top of the renderers Canvas element. With this you'll be able to delegate another DOM element +to receive those events

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + domElement + DOMElement + + + + +
    +

    the DOM element which will receive mouse and touch events

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

update

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:232 + +

+ + + + + +
+ +
+

updates the state of interactive objects

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

currentCursorStyle

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:88 + +

+ + + + +
+ +
+

The css style of the cursor that is being used

+ +
+ + + + + + +
+ + +
+

interactionDOMElement

+ HTMLCanvasElement + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:68 + +

+ + + + +
+ +
+

Our canvas

+ +
+ + + + + + +
+ + +
+

interactiveItems

+ Array + + + + + private + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:59 + +

+ + + + +
+ +
+

An array containing all the iterative items from the our interactive tree

+ +
+ + + + + + +
+ + +
+

mouse

+ InteractionData + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:24 + +

+ + + + +
+ +
+

the mouse data

+ +
+ + + + + + +
+ + +
+

mouseOut

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:96 + +

+ + + + +
+ +
+

Is set to true when the mouse is moved out of the canvas

+ +
+ + + + + + +
+ + +
+

mouseoverEnabled

+ Boolean + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:43 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

pool

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:51 + +

+ + + + +
+ +
+

tiny little interactiveData pool !

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:16 + +

+ + + + +
+ +
+

a reference to the stage

+ +
+ + + + + + +
+ + +
+

touchs

+ Object + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/InteractionManager.js:32 + +

+ + + + +
+ +
+

an object that stores current touches (InteractionData) by id reference

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/NormalMapFilter.html b/docs/classes/NormalMapFilter.html new file mode 100644 index 0000000..e44fecd --- /dev/null +++ b/docs/classes/NormalMapFilter.html @@ -0,0 +1,455 @@ + + + + + NormalMapFilter - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

NormalMapFilter Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + You can use this filter to apply all manor of crazy warping effects + Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + +
+

Properties

+ + +
+ + + + + +
+ + + + +
+

Properties

+ + +
+

map

+ Texture + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:181 + +

+ + + + +
+ +
+

The texture used for the displacemtent map * must be power of 2 texture at the moment

+ +
+ + + + + + +
+ + +
+

offset

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:211 + +

+ + + + +
+ +
+

The offset used to move the displacement map.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/filters/NormalMapFilter.js:196 + +

+ + + + +
+ +
+

The multiplier used to scale the displacement result from the map calculation.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiFastShader.html b/docs/classes/PixiFastShader.html new file mode 100644 index 0000000..a7517f6 --- /dev/null +++ b/docs/classes/PixiFastShader.html @@ -0,0 +1,782 @@ + + + + + PixiFastShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiFastShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiFastShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:134 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:81 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:25 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:14 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:20 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:72 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc - The vertex shader

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiFastShader.js:38 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PixiShader.html b/docs/classes/PixiShader.html new file mode 100644 index 0000000..20839fa --- /dev/null +++ b/docs/classes/PixiShader.html @@ -0,0 +1,936 @@ + + + + + PixiShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PixiShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PixiShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:6 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:306 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:47 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+

initSampler2D

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:173 + +

+ + + + + +
+ +
+

Initialises a Sampler2D uniform (which may only be available later on after initUniforms once the texture has loaded)

+ +
+ + + + + + +
+ + +
+

initUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:100 + +

+ + + + + +
+ +
+

Initialises the shader uniform values. +Uniforms are specified in the GLSL_ES Specification: http://www.khronos.org/registry/webgl/specs/latest/1.0/ +http://www.khronos.org/registry/gles/specs/2.0/GLSL_ES_Specification_1.0.17.pdf

+ +
+ + + + + + +
+ + +
+

syncUniforms

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:248 + +

+ + + + + +
+ +
+

Updates the shader uniform values.

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

defaultVertexSrc

+ String + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:320 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

fragmentSrc - The fragment shader.

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

textureCount - A local texture counter for multi-texture shaders.

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PixiShader.js:37 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PolyK.html b/docs/classes/PolyK.html new file mode 100644 index 0000000..828f5db --- /dev/null +++ b/docs/classes/PolyK.html @@ -0,0 +1,677 @@ + + + + + PolyK - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PolyK Class

+
+ + + + + +
+ Defined in: src/pixi/utils/Polyk.js:34 +
+ + + + + Module: PIXI + + + + +
+ + + +
+

Based on the Polyk library http://polyk.ivank.net released under MIT licence. +This is an amazing lib! +slightly modified by Mat Groves (matgroves.com);

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_convex

+ + + () + + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:159 + +

+ + + + + +
+ +
+

Checks whether a shape is convex

+ +
+ + + + + + +
+ + +
+

_PointInTriangle

+ + +
+ (
    + +
  • + + px + +
  • + +
  • + + py + +
  • + +
  • + + ax + +
  • + +
  • + + ay + +
  • + +
  • + + bx + +
  • + +
  • + + by + +
  • + +
  • + + cx + +
  • + +
  • + + cy + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:122 + +

+ + + + + +
+ +
+

Checks whether a point is within a triangle

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + px + Number + + + + +
    +

    x coordinate of the point to test

    + +
    + + +
  • + +
  • + + py + Number + + + + +
    +

    y coordinate of the point to test

    + +
    + + +
  • + +
  • + + ax + Number + + + + +
    +

    x coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + ay + Number + + + + +
    +

    y coordinate of the a point of the triangle

    + +
    + + +
  • + +
  • + + bx + Number + + + + +
    +

    x coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + by + Number + + + + +
    +

    y coordinate of the b point of the triangle

    + +
    + + +
  • + +
  • + + cx + Number + + + + +
    +

    x coordinate of the c point of the triangle

    + +
    + + +
  • + +
  • + + cy + Number + + + + +
    +

    y coordinate of the c point of the triangle

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

Triangulate

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/utils/Polyk.js:43 + +

+ + + + + +
+ +
+

Triangulates shapes for webGL graphic fills

+ +
+ + + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/PrimitiveShader.html b/docs/classes/PrimitiveShader.html new file mode 100644 index 0000000..6891b94 --- /dev/null +++ b/docs/classes/PrimitiveShader.html @@ -0,0 +1,731 @@ + + + + + PrimitiveShader - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

PrimitiveShader Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

PrimitiveShader

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:92 + +

+ + + + + +
+ +
+

Destroys the shader

+ +
+ + + + + + +
+ + +
+

init

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:61 + +

+ + + + + +
+ +
+

Initialises the shader

+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

fragmentSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:23 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

gl

+ WebGLContext + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:12 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

program - The WebGL program.

+ Any + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:18 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+

vertexSrc

+ Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/shaders/PrimitiveShader.js:36 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Rope.html b/docs/classes/Rope.html new file mode 100644 index 0000000..218bf3c --- /dev/null +++ b/docs/classes/Rope.html @@ -0,0 +1,392 @@ + + + + + Rope - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Rope Class

+
+ + + + + +
+ Defined in: src/pixi/extras/Rope.js:4 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Rope

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + points + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Rope.js:4 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + points + Array + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/SpriteBatch.html b/docs/classes/SpriteBatch.html new file mode 100644 index 0000000..6a57e12 --- /dev/null +++ b/docs/classes/SpriteBatch.html @@ -0,0 +1,591 @@ + + + + + SpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

SpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

The SpriteBatch class is a really fast version of the DisplayObjectContainer +built solely for speed, so use when you need a lot of sprites or particles. +And it's extremely easy to use :

+

var container = new PIXI.SpriteBatch();

+

stage.addChild(container);

+

for(var i = 0; i < 100; i++) + { + var sprite = new PIXI.Sprite.fromImage("myImage.png"); + container.addChild(sprite); + } +And here you have a hundred sprites that will be renderer at the speed of light

+ +
+ + +
+

Constructor

+
+

SpriteBatch

+ + +
+ (
    + +
  • + + texture + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:90 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/display/SpriteBatch.js:64 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/Strip.html b/docs/classes/Strip.html new file mode 100644 index 0000000..08b6388 --- /dev/null +++ b/docs/classes/Strip.html @@ -0,0 +1,4095 @@ + + + + + Strip - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

Strip Class

+
+ + + + + + + +
+ Defined in: src/pixi/extras/Strip.js:5 +
+ + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

Strip

+ + +
+ (
    + +
  • + + texture + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + texture + Texture + + + + +
    +

    The texture to use

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the width

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the height

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

_renderCanvas

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:387 + +

+ + + + + +
+ +
+

Renders the object using the Canvas renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

_renderWebGL

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:336 + +

+ + + + + +
+ +
+

Renders the object using the WebGL renderer

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:70 + +

+ + + + + +
+ +
+

Adds a child to the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to add to the container

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

addChildAt

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:81 + +

+ + + + + +
+ +
+

Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The child to add

    + +
    + + +
  • + +
  • + + index + Number + + + + +
    +

    The index to place the child in

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

click

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:201 + +

+ + + + + +
+ +
+

A callback that is used when the users clicks on the displayObject with their mouse

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

getBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:214 + +

+ + + + + +
+ +
+

Retrieves the bounds of the displayObjectContainer as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

getChildAt

+ + +
+ (
    + +
  • + + index + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:135 + +

+ + + + + +
+ +
+

Returns the child at the specified index

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + index + Number + + + + +
    +

    The index to get the child from

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

getLocalBounds

+ + + () + + + + + Rectangle + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:437 + +

+ + + + + +
+ +
+

Retrieves the local bounds of the displayObject as a rectangle object

+ +
+ + + + +
+

Returns:

+ +
+ + + Rectangle: + +

the rectangular bounding area

+ + +
+
+ + + +
+ + +
+

mousedown

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:207 + +

+ + + + + +
+ +
+

A callback that is used when the user clicks the mouse down over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseout

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:233 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse leaves the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseover

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:227 + +

+ + + + + +
+ +
+

A callback that is used when the users mouse rolls over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseup

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:213 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject +for this callback to be fired the mouse must have been pressed down over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

mouseupoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:220 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the mouse that was over the displayObject but is no longer over the displayObject +for this callback to be fired, The touch must have started over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

onTextureUpdate

+ + +
+ (
    + +
  • + + event + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/extras/Strip.js:102 + +

+ + + + + +
+ +
+

When the texture is updated, this event will fire to update the scale and frame

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + event + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeAll +NOT tested yet

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:177 + +

+ + + + + +
+ +
+

Removes all the children

+ +
+ + + + + + +
+ + +
+

removeChild

+ + +
+ (
    + +
  • + + child + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:153 + +

+ + + + + +
+ +
+

Removes a child from the container.

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + child + DisplayObject + + + + +
    +

    The DisplayObject to remove

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

removeStageReference

+ + + () + + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:317 + +

+ + + + + +
+ +
+

removes the current stage reference of the container

+ +
+ + + + + + +
+ + +
+

setInteractive

+ + +
+ (
    + +
  • + + interactive + +
  • + +
) +
+ + + + + + deprecated + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:274 + +

+ + + +

Deprecated: Simply set the `interactive` property directly

+ + + +
+ +
+

[Deprecated] Indicates if the sprite will have touch and mouse interactivity. It is false by default +Instead of using this function you can now simply set the interactive property to true or false

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + interactive + Boolean + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setStageReference

+ + +
+ (
    + +
  • + + stage + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObjectContainer.js:299 + +

+ + + + + +
+ +
+

Sets the container's stage reference, the stage this object is connected to

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + stage + Stage + + + + +
    +

    the stage that the container will have as its current stage reference

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

swapChildren

+ + +
+ (
    + +
  • + + child + +
  • + +
  • + + child2 + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:109 + +

+ + + + + +
+ +
+

[NYI] Swaps the depth of 2 displayObjects

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

tap

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:244 + +

+ + + + + +
+ +
+

A callback that is used when the users taps on the sprite with their finger +basically a touch version of click

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchend

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:257 + +

+ + + + + +
+ +
+

A callback that is used when the user releases a touch over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchendoutside

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:263 + +

+ + + + + +
+ +
+

A callback that is used when the user releases the touch that was over the displayObject +for this callback to be fired, The touch must have started over the sprite

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+

touchstart

+ + +
+ (
    + +
  • + + interactionData + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:251 + +

+ + + + + +
+ +
+

A callback that is used when the user touches over the displayObject

+ +
+ + +
+

Parameters:

+ + +
+ + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

_bounds

+ Rectangle + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:172 + +

+ + + + +
+ +
+

The original, cached bounds of the object

+ +
+ + + + + + +
+ + +
+

_currentBounds

+ Rectangle + + + + + private + + + + + + +
+ +

Inherited from + + DisplayObject + + + but overwritten in + + + + src/pixi/display/DisplayObject.js:180 + +

+ + + + +
+ +
+

The most up-to-date bounds of the object

+ +
+ + + + + + +
+ + +
+

_interactive

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:113 + +

+ + + + +
+ +
+

[read-only] Whether or not the object is interactive, do not toggle directly! use the interactive property

+ +
+ + + + + + +
+ + +
+

alpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:45 + +

+ + + + +
+ +
+

The opacity of the object.

+ +
+ + + + + + +
+ + +
+

buttonMode

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:70 + +

+ + + + +
+ +
+

This is used to indicate if the displayObject should display a mouse hand cursor on rollover

+ +
+ + + + + + +
+ + +
+

children

+ Array + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:18 + +

+ + + + +
+ +
+

[read-only] The array of children of this container.

+ +
+ + + + + + +
+ + +
+

color

+ Array<> + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:142 + +

+ + + + +
+ +
+

[NYI] Unknown

+ +
+ + + + + + +
+ + +
+

defaultCursor

+ String + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:123 + +

+ + + + +
+ +
+

This is the cursor that will be used when the mouse is over this object. To enable this the element must have interaction = true and buttonMode = true

+ +
+ + + + + + +
+ + +
+

dynamic

+ Boolean + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:151 + +

+ + + + +
+ +
+

[NYI] Holds whether or not this object is dynamic, for rendering optimization

+ +
+ + + + + + +
+ + +
+

filterArea

+ Rectangle + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:164 + +

+ + + + +
+ +
+

The area the filter is applied to

+ +
+ + + + + + +
+ + +
+

filters

+ Array An array of filters + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:348 + +

+ + + + +
+ +
+

Sets the filters for the displayObject.

+
    +
  • IMPORTANT: This is a webGL only feature and will be ignored by the canvas renderer. +To remove filters simply set this property to 'null'
  • +
+ +
+ + + + + + +
+ + +
+

height

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:51 + +

+ + + + +
+ +
+

The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

hitArea

+ Rectangle | Circle | Ellipse | Polygon + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:61 + +

+ + + + +
+ +
+

This is the defined area that will pick up mouse / touch events. It is null by default. +Setting it is a neat way of optimising the hitTest function that the interactionManager will use (as it will not need to hit test all the children)

+ +
+ + + + + + +
+ + +
+

interactive

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:287 + +

+ + + + +
+ +
+

Indicates if the sprite will have touch and mouse interactivity. It is false by default

+ +
+ + +

Default: false

+ + + + + +
+ + +
+

mask

+ Graphics + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:328 + +

+ + + + +
+ +
+

Sets a mask for the displayObject. A mask is an object that limits the visibility of an object to the shape of the mask applied to it. +In PIXI a regular mask must be a PIXI.Graphics object. This allows for much faster masking in canvas as it utilises shape clipping. +To remove a mask, set this property to null.

+ +
+ + + + + + +
+ + +
+

parent

+ DisplayObjectContainer + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:86 + +

+ + + + +
+ +
+

[read-only] The display object container that contains this display object.

+ +
+ + + + + + +
+ + +
+

pivot

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:29 + +

+ + + + +
+ +
+

The pivot point of the displayObject that it rotates around

+ +
+ + + + + + +
+ + +
+

position

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:13 + +

+ + + + +
+ +
+

The coordinate of the object relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

renderable

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:78 + +

+ + + + +
+ +
+

Can this object be rendered

+ +
+ + + + + + +
+ + +
+

rotation

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:37 + +

+ + + + +
+ +
+

The rotation of the object in radians.

+ +
+ + + + + + +
+ + +
+

scale

+ Point + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:21 + +

+ + + + +
+ +
+

The scale factor of the object.

+ +
+ + + + + + +
+ + +
+

stage

+ Stage + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:95 + +

+ + + + +
+ +
+

[read-only] The stage the display object is connected to, or undefined if it is not connected to the stage.

+ +
+ + + + + + +
+ + +
+

visible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:53 + +

+ + + + +
+ +
+

The visibility of the object.

+ +
+ + + + + + +
+ + +
+

width

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObjectContainer: + + + + src/pixi/display/DisplayObjectContainer.js:32 + +

+ + + + +
+ +
+

The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

+ +
+ + + + + + +
+ + +
+

worldAlpha

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:104 + +

+ + + + +
+ +
+

[read-only] The multiplied alpha of the displayObject

+ +
+ + + + + + +
+ + +
+

worldTransform

+ Mat3 + + + + + private + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:132 + +

+ + + + +
+ +
+

[read-only] Current transform of the object based on world (parent) factors

+ +
+ + + + + + +
+ + +
+

worldVisible

+ Boolean + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:307 + +

+ + + + +
+ +
+

[read-only] Indicates if the sprite is globaly visible.

+ +
+ + + + + + +
+ + +
+

x

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:490 + +

+ + + + +
+ +
+

The position of the displayObject on the x axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+

y

+ Number + + + + + + + + + +
+ + +

Inherited from + DisplayObject: + + + + src/pixi/display/DisplayObject.js:505 + +

+ + + + +
+ +
+

The position of the displayObject on the y axis relative to the local coordinates of the parent.

+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLFilterManager.html b/docs/classes/WebGLFilterManager.html new file mode 100644 index 0000000..0e7c6eb --- /dev/null +++ b/docs/classes/WebGLFilterManager.html @@ -0,0 +1,1066 @@ + + + + + WebGLFilterManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLFilterManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLFilterManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

applyFilterPass

+ + +
+ (
    + +
  • + + filter + +
  • + +
  • + + filterArea + +
  • + +
  • + + width + +
  • + +
  • + + height + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:308 + +

+ + + + + +
+ +
+

Applies the filter to the specified area

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filter + AbstractFilter + + + + +
    +

    the filter that needs to be applied

    + +
    + + +
  • + +
  • + + filterArea + Texture + + + + +
    +

    TODO - might need an update

    + +
    + + +
  • + +
  • + + width + Number + + + + +
    +

    the horizontal range of the filter

    + +
    + + +
  • + +
  • + + height + Number + + + + +
    +

    the vertical range of the filter

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
  • + + buffer + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:38 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
  • + + buffer + ArrayBuffer + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:426 + +

+ + + + + +
+ +
+

Destroys the filter and removes it from the filter stack

+ +
+ + + + + + +
+ + +
+

initShaderBuffers

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:366 + +

+ + + + + +
+ +
+

Initialises the shader buffers

+ +
+ + + + + + +
+ + +
+

popFilter

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:131 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + + + + + +
+ + +
+

pushFilter

+ + +
+ (
    + +
  • + + filterBlock + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:56 + +

+ + + + + +
+ +
+

Applies the filter and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + filterBlock + Object + + + + +
    +

    the filter that will be pushed to the current filter stack

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLFilterManager.js:25 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLGraphics.html b/docs/classes/WebGLGraphics.html new file mode 100644 index 0000000..6a308fa --- /dev/null +++ b/docs/classes/WebGLGraphics.html @@ -0,0 +1,1035 @@ + + + + + WebGLGraphics - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLGraphics Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

A set of functions used by the webGL renderer to draw the primitive graphics data

+ +
+ + + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

buildCircle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:211 + +

+ + + + + +
+ +
+

Builds a circle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to draw

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildLine

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:283 + +

+ + + + + +
+ +
+

Builds a line to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildPoly

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:493 + +

+ + + + + +
+ +
+

Builds a polygon to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

buildRectangle

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + webGLData + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:142 + +

+ + + + + +
+ +
+

Builds a rectangle to draw

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object containing all the necessary properties

    + +
    + + +
  • + +
  • + + webGLData + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderGraphics

+ + +
+ (
    + +
  • + + graphics + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:17 + +

+ + + + + +
+ +
+

Renders the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphics + Graphics + + + + +
    + +
    + + +
  • + +
  • + + renderSession + Object + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

updateGraphics

+ + +
+ (
    + +
  • + + graphicsData + +
  • + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + static + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLGraphics.js:87 + +

+ + + + + +
+ +
+

Updates the graphics object

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + graphicsData + Graphics + + + + +
    +

    The graphics object to update

    + +
    + + +
  • + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLMaskManager.html b/docs/classes/WebGLMaskManager.html new file mode 100644 index 0000000..93ac2bc --- /dev/null +++ b/docs/classes/WebGLMaskManager.html @@ -0,0 +1,759 @@ + + + + + WebGLMaskManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLMaskManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLMaskManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:6 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:89 + +

+ + + + + +
+ +
+

Destroys the mask stack

+ +
+ + + + + + +
+ + +
+

popMask

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:60 + +

+ + + + + +
+ +
+

Removes the last filter from the filter stack and doesn't return it

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    an object containing all the useful parameters

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

pushMask

+ + +
+ (
    + +
  • + + maskData + +
  • + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:30 + +

+ + + + + +
+ +
+

Applies the Mask and adds it to the current filter stack

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + maskData + Array + + + + +
    + +
    + + +
  • + +
  • + + renderSession + RenderSession + + + + +
    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLMaskManager.js:20 + +

+ + + + + +
+ +
+

Sets the drawing context to the one given in parameter

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLShaderManager.html b/docs/classes/WebGLShaderManager.html new file mode 100644 index 0000000..7757468 --- /dev/null +++ b/docs/classes/WebGLShaderManager.html @@ -0,0 +1,885 @@ + + + + + WebGLShaderManager - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLShaderManager Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLShaderManager

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:5 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + + + + + +
+ + +
+

Methods

+ + +
+

activatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:113 + +

+ + + + + +
+ +
+

Triggers the primitive shader

+ +
+ + + + + + +
+ + +
+

activateShader

+ + +
+ (
    + +
  • + + shader + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:96 + +

+ + + + + +
+ +
+

Sets-up the given shader

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + shader + Object + + + + +
    +

    the shader that is going to be activated

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

deactivatePrimitiveShader

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:127 + +

+ + + + + +
+ +
+

Disable the primitive shader

+ +
+ + + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:140 + +

+ + + + + +
+ +
+

Destroys

+ +
+ + + + + + +
+ + +
+

setAttribs

+ + +
+ (
    + +
  • + + attribs + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:52 + +

+ + + + + +
+ +
+

Takes the attributes given in parameters

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + attribs + Array + + + + +
    +

    attribs

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
  • + + transparent + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLShaderManager.js:28 + +

+ + + + + +
+ +
+

Initialises the context and the properties

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
  • + + transparent + Boolean + + + + +
    +

    Whether or not the drawing context should be transparent

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+ + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/WebGLSpriteBatch.html b/docs/classes/WebGLSpriteBatch.html new file mode 100644 index 0000000..cec895b --- /dev/null +++ b/docs/classes/WebGLSpriteBatch.html @@ -0,0 +1,1396 @@ + + + + + WebGLSpriteBatch - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

WebGLSpriteBatch Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+ +
+ + +
+

Constructor

+
+

WebGLSpriteBatch

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + private + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:11 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ +
+ + +
+ + +
+
+

Item Index

+ + +
+

Methods

+ + +
+ + + +
+

Properties

+ + +
+ + + + + +
+ + +
+

Methods

+ + +
+

begin

+ + +
+ (
    + +
  • + + renderSession + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:108 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + renderSession + RenderSession + + + + +
    +

    the RenderSession

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

destroy

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:477 + +

+ + + + + +
+ +
+

Destroys the SpriteBatch

+ +
+ + + + + + +
+ + +
+

end

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:122 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

flush

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:376 + +

+ + + + + +
+ +
+

Renders the content and empties the current batch

+ +
+ + + + + + +
+ + +
+

render

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:132 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + Sprite + + + + +
    +

    the sprite to render when using this spritebatch

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

renderTilingSprite

+ + +
+ (
    + +
  • + + sprite + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:251 + +

+ + + + + +
+ +
+

Renders a tilingSprite using the spriteBatch

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + sprite + TilingSprite + + + + +
    +

    the tilingSprite to render

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setBlendMode

+ + +
+ (
    + +
  • + + blendMode + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:461 + +

+ + + + + +
+ +
+

Sets-up the given blendMode from WebGL's point of view

+ +
+ + +
+

Parameters:

+ +
    + +
  • + + blendMode + Number + + + + +
    +

    the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

setContext

+ + +
+ (
    + +
  • + + gl + +
  • + +
) +
+ + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:81 + +

+ + + + + +
+ +
+ +
+ + +
+

Parameters:

+ +
    + +
  • + + gl + WebGLContext + + + + +
    +

    the current WebGL drawing context

    + +
    + + +
  • + +
+
+ + + + + +
+ + +
+

start

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:428 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+

stop

+ + + () + + + + + + + + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:418 + +

+ + + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + +
+

Properties

+ + +
+

indices

+ Uint16Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:53 + +

+ + + + +
+ +
+

Holds the indices

+ +
+ + + + + + +
+ + +
+

size

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:30 + +

+ + + + +
+ +
+

The number of images in the SpriteBatch before it flushes

+ +
+ + + + + + +
+ + +
+

vertices

+ Float32Array + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:44 + +

+ + + + +
+ +
+

Holds the vertices

+ +
+ + + + + + +
+ + +
+

vertSize

+ Number + + + + + + + + + +
+ + + +

+ + Defined in + + + + + src/pixi/renderers/webgl/utils/WebGLSpriteBatch.js:22 + +

+ + + + +
+ +
+ +
+ + + + + + +
+ + +
+ + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/classes/autoDetectRenderer.html b/docs/classes/autoDetectRenderer.html new file mode 100644 index 0000000..f0ffab3 --- /dev/null +++ b/docs/classes/autoDetectRenderer.html @@ -0,0 +1,283 @@ + + + + + autoDetectRenderer - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

autoDetectRenderer Class

+
+ + + + + + + + + + + Module: PIXI + + + + +
+ + + +
+

This helper function will automatically detect which renderer you should be using. +WebGL is the preferred renderer as it is a lot faster. If webGL is not supported by +the browser then this function will return a canvas renderer

+ +
+ + + +
+ + +
+
+

Item Index

+ + + + + + + + +
+ + + + + + + + +
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_InteractionData.js.html b/docs/files/src_pixi_InteractionData.js.html new file mode 100644 index 0000000..ec7973e --- /dev/null +++ b/docs/files/src_pixi_InteractionData.js.html @@ -0,0 +1,288 @@ + + + + + src/pixi/InteractionData.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/InteractionData.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+ 
+/**
+ * Holds all information related to an Interaction event
+ *
+ * @class InteractionData
+ * @constructor
+ */
+PIXI.InteractionData = function()
+{
+    /**
+     * This point stores the global coords of where the touch/mouse event happened
+     *
+     * @property global
+     * @type Point
+     */
+    this.global = new PIXI.Point();
+
+    // this is here for legacy... but will remove
+    this.local = new PIXI.Point();
+
+    /**
+     * The target Sprite that was interacted with
+     *
+     * @property target
+     * @type Sprite
+     */
+    this.target = null;
+
+    /**
+     * When passed to an event handler, this will be the original DOM Event that was captured
+     *
+     * @property originalEvent
+     * @type Event
+     */
+    this.originalEvent = null;
+};
+
+/**
+ * This will return the local coordinates of the specified displayObject for this InteractionData
+ *
+ * @method getLocalPosition
+ * @param displayObject {DisplayObject} The DisplayObject that you would like the local coords off
+ * @return {Point} A point containing the coordinates of the InteractionData position relative to the DisplayObject
+ */
+PIXI.InteractionData.prototype.getLocalPosition = function(displayObject)
+{
+    var worldTransform = displayObject.worldTransform;
+    var global = this.global;
+
+    // do a cheeky transform to get the mouse coords;
+    var a00 = worldTransform.a, a01 = worldTransform.b, a02 = worldTransform.tx,
+        a10 = worldTransform.c, a11 = worldTransform.d, a12 = worldTransform.ty,
+        id = 1 / (a00 * a11 + a01 * -a10);
+    // set the mouse coords...
+    return new PIXI.Point(a11 * id * global.x + -a01 * id * global.y + (a12 * a01 - a02 * a11) * id,
+                               a00 * id * global.y + -a10 * id * global.x + (-a12 * a00 + a02 * a10) * id);
+};
+
+// constructor
+PIXI.InteractionData.prototype.constructor = PIXI.InteractionData;
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_core_Matrix.js.html b/docs/files/src_pixi_core_Matrix.js.html new file mode 100644 index 0000000..584e249 --- /dev/null +++ b/docs/files/src_pixi_core_Matrix.js.html @@ -0,0 +1,317 @@ + + + + + src/pixi/core/Matrix.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/core/Matrix.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+PIXI.determineMatrixArrayType = function() {
+    return (typeof Float32Array !== 'undefined') ? Float32Array : Array;
+};
+
+/*
+* @class Matrix2
+* The Matrix2 class will choose the best type of array to use between
+* a regular javascript Array and a Float32Array if the latter is available
+*
+*/
+PIXI.Matrix2 = PIXI.determineMatrixArrayType();
+
+/*
+* @class Matrix
+* The Matrix class is now an object, which makes it a lot faster, 
+* here is a representation of it : 
+* | a | b | tx|
+* | c | c | ty|
+* | 0 | 0 | 1 |
+*
+*/
+PIXI.Matrix = function()
+{
+    this.a = 1;
+    this.b = 0;
+    this.c = 0;
+    this.d = 1;
+    this.tx = 0;
+    this.ty = 0;
+};
+
+/**
+ * Creates a pixi matrix object based on the array given as a parameter
+ *
+ * @method fromArray
+ * @param array {Array} The array that the matrix will be filled with
+ */
+PIXI.Matrix.prototype.fromArray = function(array)
+{
+    this.a = array[0];
+    this.b = array[1];
+    this.c = array[3];
+    this.d = array[4];
+    this.tx = array[2];
+    this.ty = array[5];
+};
+
+/**
+ * Creates an array from the current Matrix object
+ *
+ * @method toArray
+ * @param transpose {Boolean} Whether we need to transpose the matrix or not
+ * @return array {Array} the newly created array which contains the matrix
+ */
+PIXI.Matrix.prototype.toArray = function(transpose)
+{
+    if(!this.array) this.array = new Float32Array(9);
+    var array = this.array;
+
+    if(transpose)
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.c;
+        this.array[2] = 0;
+        this.array[3] = this.b;
+        this.array[4] = this.d;
+        this.array[5] = 0;
+        this.array[6] = this.tx;
+        this.array[7] = this.ty;
+        this.array[8] = 1;
+    }
+    else
+    {
+        this.array[0] = this.a;
+        this.array[1] = this.b;
+        this.array[2] = this.tx;
+        this.array[3] = this.c;
+        this.array[4] = this.d;
+        this.array[5] = this.ty;
+        this.array[6] = 0;
+        this.array[7] = 0;
+        this.array[8] = 1;
+    }
+
+    return array;//[this.a, this.b, this.tx, this.c, this.d, this.ty, 0, 0, 1];
+};
+
+PIXI.identityMatrix = new PIXI.Matrix();
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_display_SpriteBatch.js.html b/docs/files/src_pixi_display_SpriteBatch.js.html new file mode 100644 index 0000000..d3f333e --- /dev/null +++ b/docs/files/src_pixi_display_SpriteBatch.js.html @@ -0,0 +1,400 @@ + + + + + src/pixi/display/SpriteBatch.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/display/SpriteBatch.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/
+ */
+
+/**
+ * The SpriteBatch class is a really fast version of the DisplayObjectContainer 
+ * built solely for speed, so use when you need a lot of sprites or particles.
+ * And it's extremely easy to use : 
+
+    var container = new PIXI.SpriteBatch();
+ 
+    stage.addChild(container);
+ 
+    for(var i  = 0; i < 100; i++)
+    {
+        var sprite = new PIXI.Sprite.fromImage("myImage.png");
+        container.addChild(sprite);
+    }
+ * And here you have a hundred sprites that will be renderer at the speed of light
+ *
+ * @class SpriteBatch
+ * @constructor
+ * @param texture {Texture}
+ */
+PIXI.SpriteBatch = function(texture)
+{
+    PIXI.DisplayObjectContainer.call( this);
+
+    this.textureThing = texture;
+
+    this.ready = false;
+};
+
+PIXI.SpriteBatch.prototype = Object.create(PIXI.DisplayObjectContainer.prototype);
+PIXI.SpriteBatch.constructor = PIXI.SpriteBatch;
+
+/*
+ * Initialises the spriteBatch
+ *
+ * @method initWebGL
+ * @param gl {WebGLContext} the current WebGL drawing context
+ */
+PIXI.SpriteBatch.prototype.initWebGL = function(gl)
+{
+    // TODO only one needed for the whole engine really?
+    this.fastSpriteBatch = new PIXI.WebGLFastSpriteBatch(gl);
+
+    this.ready = true;
+};
+
+/*
+ * Updates the object transform for rendering
+ *
+ * @method updateTransform
+ * @private
+ */
+PIXI.SpriteBatch.prototype.updateTransform = function()
+{
+   // TODO dont need to!
+    PIXI.DisplayObject.prototype.updateTransform.call( this );
+  //  PIXI.DisplayObjectContainer.prototype.updateTransform.call( this );
+};
+
+/**
+* Renders the object using the WebGL renderer
+*
+* @method _renderWebGL
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderWebGL = function(renderSession)
+{
+    if(!this.visible || this.alpha <= 0 || !this.children.length)return;
+
+    if(!this.ready)this.initWebGL( renderSession.gl );
+    
+    renderSession.spriteBatch.stop();
+    
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.fastShader);
+    
+    this.fastSpriteBatch.begin(this, renderSession);
+    this.fastSpriteBatch.render(this);
+
+    renderSession.shaderManager.activateShader(renderSession.shaderManager.defaultShader);
+
+    renderSession.spriteBatch.start();
+ 
+};
+
+/**
+* Renders the object using the Canvas renderer
+*
+* @method _renderCanvas
+* @param renderSession {RenderSession} 
+* @private
+*/
+PIXI.SpriteBatch.prototype._renderCanvas = function(renderSession)
+{
+    var context = renderSession.context;
+    context.globalAlpha = this.worldAlpha;
+
+    var transform = this.worldTransform;
+
+    // alow for trimming
+       
+    if (renderSession.roundPixels)
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, Math.floor(transform.tx), Math.floor(transform.ty));
+    }
+    else
+    {
+        context.setTransform(transform.a, transform.c, transform.b, transform.d, transform.tx, transform.ty);
+    }
+
+    context.save();
+
+    for (var i = 0; i < this.children.length; i++) {
+       
+        var child = this.children[i];
+        var texture = child.texture;
+        var frame = texture.frame;
+
+        context.globalAlpha = this.worldAlpha * child.alpha;
+
+        if(child.rotation % (Math.PI * 2) === 0)
+        {
+          
+          // this is the fastest  way to optimise! - if rotation is 0 then we can avoid any kind of setTransform call
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width * child.scale.x) + child.position.x  + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height * child.scale.y) + child.position.y  + 0.5) | 0,
+                                 frame.width * child.scale.x,
+                                 frame.height * child.scale.y);
+        }
+        else
+        {
+            PIXI.DisplayObject.prototype.updateTransform.call(child);
+           
+            transform = child.localTransform;
+
+            if(this.rotation !== this.rotationCache)
+            {
+                this.rotationCache = this.rotation;
+                this._sr =  Math.sin(this.rotation);
+                this._cr =  Math.cos(this.rotation);
+            }
+
+            var a = child._cr * child.scale.x,
+                b = -child._sr * child.scale.y,
+                c = child._sr * child.scale.x,
+                d = child._cr * child.scale.y;
+                
+            context.setTransform(a, c, b, d, child.position.x, child.position.y);
+            
+            context.drawImage(texture.baseTexture.source,
+                                 frame.x,
+                                 frame.y,
+                                 frame.width,
+                                 frame.height,
+                                 ((child.anchor.x) * (-frame.width) + 0.5) | 0,
+                                 ((child.anchor.y) * (-frame.height) + 0.5) | 0,
+                                 frame.width,
+                                 frame.height);
+
+        }
+    }
+
+    context.restore();
+};
+
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_filters_NormalMapFilter.js.html b/docs/files/src_pixi_filters_NormalMapFilter.js.html new file mode 100644 index 0000000..30083fc --- /dev/null +++ b/docs/files/src_pixi_filters_NormalMapFilter.js.html @@ -0,0 +1,449 @@ + + + + + src/pixi/filters/NormalMapFilter.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/filters/NormalMapFilter.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+
+/**
+ * 
+ * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. 
+ * You can use this filter to apply all manor of crazy warping effects
+ * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y.
+ * @class NormalMapFilter
+ * @contructor
+ * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment
+ */
+PIXI.NormalMapFilter = function(texture)
+{
+	PIXI.AbstractFilter.call( this );
+	
+	this.passes = [this];
+	texture.baseTexture._powerOf2 = true;
+
+	// set the uniforms
+	this.uniforms = {
+		displacementMap: {type: 'sampler2D', value:texture},
+		scale:			 {type: '2f', value:{x:15, y:15}},
+		offset:			 {type: '2f', value:{x:0, y:0}},
+		mapDimensions:   {type: '2f', value:{x:1, y:1}},
+		dimensions:   {type: '4f', value:[0,0,0,0]},
+	//	LightDir: {type: 'f3', value:[0, 1, 0]},
+		LightPos: {type: '3f', value:[0, 1, 0]}
+	};
+	
+
+	if(texture.baseTexture.hasLoaded)
+	{
+		this.uniforms.mapDimensions.value.x = texture.width;
+		this.uniforms.mapDimensions.value.y = texture.height;
+	}
+	else
+	{
+		this.boundLoadedFunction = this.onTextureLoaded.bind(this);
+
+		texture.baseTexture.on("loaded", this.boundLoadedFunction);
+	}
+
+	this.fragmentSrc = [
+	  "precision mediump float;",
+	  "varying vec2 vTextureCoord;",
+	  "varying float vColor;",
+	  "uniform sampler2D displacementMap;",
+	  "uniform sampler2D uSampler;",
+	 
+	  "uniform vec4 dimensions;",
+	  
+		"const vec2 Resolution = vec2(1.0,1.0);",      //resolution of screen
+		"uniform vec3 LightPos;",    //light position, normalized
+		"const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);",      //light RGBA -- alpha is intensity
+		"const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);",    //ambient RGBA -- alpha is intensity 
+		"const vec3 Falloff = vec3(0.0, 1.0, 0.2);",         //attenuation coefficients
+
+		"uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);",
+
+
+	  "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);",
+	 
+
+	  "void main(void) {",
+	  	"vec2 mapCords = vTextureCoord.xy;",
+
+	  	"vec4 color = texture2D(uSampler, vTextureCoord.st);",
+        "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;",
+ 
+
+	  	"mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);",
+	  
+	  	"mapCords.y *= -1.0;",
+	 	"mapCords.y += 1.0;",
+
+	 	//RGBA of our diffuse color
+		"vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);",
+
+		//RGB of our normal map
+		"vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;",
+
+		//The delta position of light
+		//"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);",
+		"vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);",
+		//Correct for aspect ratio
+		//"LightDir.x *= Resolution.x / Resolution.y;",
+
+		//Determine distance (used for attenuation) BEFORE we normalize our LightDir
+		"float D = length(LightDir);",
+
+		//normalize our vectors
+		"vec3 N = normalize(NormalMap * 2.0 - 1.0);",
+		"vec3 L = normalize(LightDir);",
+
+		//Pre-multiply light color with intensity
+		//Then perform "N dot L" to determine our diffuse term
+		"vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);",
+
+		//pre-multiply ambient color with intensity
+		"vec3 Ambient = AmbientColor.rgb * AmbientColor.a;",
+
+		//calculate attenuation
+		"float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );",
+
+		//the calculation which brings it all together
+		"vec3 Intensity = Ambient + Diffuse * Attenuation;",
+		"vec3 FinalColor = DiffuseColor.rgb * Intensity;",
+		"gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);",
+		//"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);",
+	/*
+	 	// normalise color
+	 	"vec3 normal = normalize(nColor * 2.0 - 1.0);",
+	 	
+	 	"vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );",
+
+	 	"float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);",
+
+	 	"float d = sqrt(dot(deltaPos, deltaPos));", 
+        "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );",
+
+        "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;",
+        "result *= color.rgb;",
+       
+        "gl_FragColor = vec4(result, 1.0);",*/
+
+	  	
+
+	  "}"
+	];
+	
+}
+
+/*
+void main() {
+        //sample color & normals from our textures
+        vec4 color = texture2D(u_texture, v_texCoords.st);
+        vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb;
+ 
+        //some bump map programs will need the Y value flipped..
+        nColor.g = yInvert ? 1.0 - nColor.g : nColor.g;
+ 
+        //this is for debugging purposes, allowing us to lower the intensity of our bump map
+        vec3 nBase = vec3(0.5, 0.5, 1.0);
+        nColor = mix(nBase, nColor, strength);
+ 
+        //normals need to be converted to [-1.0, 1.0] range and normalized
+        vec3 normal = normalize(nColor * 2.0 - 1.0);
+ 
+        //here we do a simple distance calculation
+        vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );
+ 
+        vec3 lightDir = normalize(deltaPos);
+        float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0;
+       
+        //now let's get a nice little falloff
+        float d = sqrt(dot(deltaPos, deltaPos));       
+        float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0;
+       
+        vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;
+        result *= color.rgb;
+       
+        gl_FragColor = v_color * vec4(result, color.a);
+}
+*/
+PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype );
+PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter;
+
+PIXI.NormalMapFilter.prototype.onTextureLoaded = function()
+{
+	
+	this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width;
+	this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height;
+
+	this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction)
+
+}
+
+/**
+ * The texture used for the displacemtent map * must be power of 2 texture at the moment
+ *
+ * @property map
+ * @type Texture
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', {
+    get: function() {
+        return this.uniforms.displacementMap.value;
+    },
+    set: function(value) {
+    	this.uniforms.displacementMap.value = value;
+    }
+});
+
+/**
+ * The multiplier used to scale the displacement result from the map calculation.
+ *
+ * @property scale
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', {
+    get: function() {
+        return this.uniforms.scale.value;
+    },
+    set: function(value) {
+    	this.uniforms.scale.value = value;
+    }
+});
+
+/**
+ * The offset used to move the displacement map.
+ *
+ * @property offset
+ * @type Point
+ */
+Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', {
+    get: function() {
+        return this.uniforms.offset.value;
+    },
+    set: function(value) {
+    	this.uniforms.offset.value = value;
+    }
+});
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html new file mode 100644 index 0000000..ee78510 --- /dev/null +++ b/docs/files/src_pixi_renderers_webgl_utils_FilterTexture.js.html @@ -0,0 +1,310 @@ + + + + + src/pixi/renderers/webgl/utils/FilterTexture.js - pixi.js + + + + + + + + +
+
+
+ +

+ +
+
+ API Docs for: 1.5.0 +
+
+
+ + +
+
+ Show: + + + + + + + +
+ + +
+
+
+

File: src/pixi/renderers/webgl/utils/FilterTexture.js

+ +
+
+/**
+ * @author Mat Groves http://matgroves.com/ @Doormat23
+ */
+
+/**
+* @class FilterTexture
+* @constructor
+* @param gl {WebGLContext} the current WebGL drawing context
+* @param width {Number} the horizontal range of the filter
+* @param height {Number} the vertical range of the filter
+* @private
+*/
+PIXI.FilterTexture = function(gl, width, height)
+{
+    /**
+     * @property gl
+     * @type WebGLContext
+     */
+    this.gl = gl;
+
+    // next time to create a frame buffer and texture
+    this.frameBuffer = gl.createFramebuffer();
+    this.texture = gl.createTexture();
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);
+    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.framebuffer );
+
+    gl.bindFramebuffer(gl.FRAMEBUFFER, this.frameBuffer );
+    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, this.texture, 0);
+
+    this.resize(width, height);
+};
+
+
+/**
+* Clears the filter texture
+* @method clear
+*/
+PIXI.FilterTexture.prototype.clear = function()
+{
+    var gl = this.gl;
+    
+    gl.clearColor(0,0,0, 0);
+    gl.clear(gl.COLOR_BUFFER_BIT);
+};
+
+/**
+ * Resizes the texture to the specified width and height
+ *
+ * @method resize
+ * @param width {Number} the new width of the texture
+ * @param height {Number} the new height of the texture
+ */
+PIXI.FilterTexture.prototype.resize = function(width, height)
+{
+    if(this.width === width && this.height === height) return;
+
+    this.width = width;
+    this.height = height;
+
+    var gl = this.gl;
+
+    gl.bindTexture(gl.TEXTURE_2D,  this.texture);
+    gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA,  width, height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);
+
+};
+
+/**
+* Destroys the filter texture
+* @method destroy
+*/
+PIXI.FilterTexture.prototype.destroy = function()
+{
+    var gl = this.gl;
+    gl.deleteFramebuffer( this.frameBuffer );
+    gl.deleteTexture( this.texture );
+
+    this.frameBuffer = null;
+    this.texture = null;
+};
+
+    
+
+ +
+
+
+
+
+
+ + + + + + + + + + diff --git a/examples/example 1 - Basics/index.html b/examples/example 1 - Basics/index.html index 1ca9160..dec5ce3 100644 --- a/examples/example 1 - Basics/index.html +++ b/examples/example 1 - Basics/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 10 - Text/index.html b/examples/example 10 - Text/index.html index 0bc8242..dbc2969 100644 --- a/examples/example 10 - Text/index.html +++ b/examples/example 10 - Text/index.html @@ -1,7 +1,6 @@ - pixi.js example 10 Text - diff --git a/examples/example 11 - RenderTexture/index.html b/examples/example 11 - RenderTexture/index.html index c78c0cb..8e186af 100644 --- a/examples/example 11 - RenderTexture/index.html +++ b/examples/example 11 - RenderTexture/index.html @@ -10,7 +10,6 @@ } - @@ -40,8 +39,8 @@ var outputSprite = new PIXI.Sprite(currentTexture); // align the sprite - outputSprite.position.x = 800/2; - outputSprite.position.y = 600/2; + outputSprite.position.x = 800 / 2; + outputSprite.position.y = 600 / 2; outputSprite.anchor.x = 0.5; outputSprite.anchor.y = 0.5; @@ -50,8 +49,8 @@ var stuffContainer = new PIXI.DisplayObjectContainer(); - stuffContainer.position.x = 800/2; - stuffContainer.position.y = 600/2 + stuffContainer.position.x = 800 / 2; + stuffContainer.position.y = 600 / 2 stage.addChild(stuffContainer); @@ -82,14 +81,13 @@ // used for spinning! var count = 0; - requestAnimFrame(animate); function animate() { requestAnimFrame( animate ); - for (var i=0; i < items.length; i++) + for (var i = 0; i < items.length; i++) { // rotate each item var item = items[i]; @@ -103,13 +101,12 @@ renderTexture = renderTexture2; renderTexture2 = temp; - // set the new texture outputSprite.setTexture(renderTexture); // twist this up! stuffContainer.rotation -= 0.01 - outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; + outputSprite.scale.x = outputSprite.scale.y = 1 + Math.sin(count) * 0.2; // render the stage to the texture // the true clears the texture before content is rendered diff --git a/examples/example 13 - Graphics/index.html b/examples/example 13 - Graphics/index.html index 0be15ce..4f36d9f 100644 --- a/examples/example 13 - Graphics/index.html +++ b/examples/example 13 - Graphics/index.html @@ -15,15 +15,12 @@ diff --git a/examples/example 15 - Filters/index.html b/examples/example 15 - Filters/index.html index 8403dec..bab78a7 100644 --- a/examples/example 15 - Filters/index.html +++ b/examples/example 15 - Filters/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 15 - Filters/indexAll.html b/examples/example 15 - Filters/indexAll.html index 3770f58..539f3e4 100644 --- a/examples/example 15 - Filters/indexAll.html +++ b/examples/example 15 - Filters/indexAll.html @@ -12,12 +12,10 @@ - - + diff --git a/examples/example 17 - Tinting/index.html b/examples/example 17 - Tinting/index.html index 1a0961d..03291cf 100644 --- a/examples/example 17 - Tinting/index.html +++ b/examples/example 17 - Tinting/index.html @@ -24,7 +24,6 @@ diff --git a/examples/example 18 - Batch/index.html b/examples/example 18 - Batch/index.html index 354e725..b362509 100644 --- a/examples/example 18 - Batch/index.html +++ b/examples/example 18 - Batch/index.html @@ -18,15 +18,12 @@ } - - diff --git a/examples/example 19 - Normal/1223-normal.jpg b/examples/example 19 - Normal/1223-normal.jpg new file mode 100644 index 0000000..d145be3 --- /dev/null +++ b/examples/example 19 - Normal/1223-normal.jpg Binary files differ diff --git a/examples/example 19 - Normal/BGrotate.jpg b/examples/example 19 - Normal/BGrotate.jpg new file mode 100644 index 0000000..b396dbc --- /dev/null +++ b/examples/example 19 - Normal/BGrotate.jpg Binary files differ diff --git a/examples/example 19 - Normal/NormalMapFilter.js b/examples/example 19 - Normal/NormalMapFilter.js new file mode 100644 index 0000000..3366179 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter.js @@ -0,0 +1,231 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + //texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + zoomScale: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4fv', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3fv', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying vec4 vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.9);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 0.3, 0.4);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + "uniform vec2 zoomScale;", + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + +//427 × 60 + "mapCords *= dimensions.xy/mapDimensions;", + "mapCords /= zoomScale;", + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", +//"vec4 DiffuseColor = vec4(1.0, 0.0, 1.0, 1.0);", + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //"LightPos /= mapDimensions;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3((LightPos.xy/mapDimensions) - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + //" Attenuation *=0.2;", + " Attenuation = min(Attenuation, 1.0);", + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity * 0.5;", + // "FinalColor = mix(FinalColor, vColor.rgb, 1.0);", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + // "gl_FragColor = vec4(NormalMap, 1.0);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/NormalMapFilter__.js b/examples/example 19 - Normal/NormalMapFilter__.js new file mode 100644 index 0000000..ca24c24 --- /dev/null +++ b/examples/example 19 - Normal/NormalMapFilter__.js @@ -0,0 +1,225 @@ +/** + * @author Mat Groves http://matgroves.com/ @Doormat23 + */ + + +/** + * + * The NormalMapFilter class uses the pixel values from the specified texture (called the displacement map) to perform a displacement of an object. + * You can use this filter to apply all manor of crazy warping effects + * Currently the r property of the texture is used offset the x and the g propery of the texture is used to offset the y. + * @class NormalMapFilter + * @contructor + * @param texture {Texture} The texture used for the displacemtent map * must be power of 2 texture at the moment + */ +PIXI.NormalMapFilter = function(texture) +{ + PIXI.AbstractFilter.call( this ); + + this.passes = [this]; + texture.baseTexture._powerOf2 = true; + + // set the uniforms + //console.log() + this.uniforms = { + displacementMap: {type: 'sampler2D', value:texture}, + scale: {type: '2f', value:{x:15, y:15}}, + offset: {type: '2f', value:{x:0, y:0}}, + mapDimensions: {type: '2f', value:{x:1, y:1}}, + dimensions: {type: '4f', value:[0,0,0,0]}, + // LightDir: {type: 'f3', value:[0, 1, 0]}, + LightPos: {type: '3f', value:[0, 1, 0]} + }; + + + if(texture.baseTexture.hasLoaded) + { + this.uniforms.mapDimensions.value.x = texture.width; + this.uniforms.mapDimensions.value.y = texture.height; + } + else + { + this.boundLoadedFunction = this.onTextureLoaded.bind(this); + + texture.baseTexture.on("loaded", this.boundLoadedFunction); + } + + this.fragmentSrc = [ + "precision mediump float;", + "varying vec2 vTextureCoord;", + "varying float vColor;", + "uniform sampler2D displacementMap;", + "uniform sampler2D uSampler;", + + "uniform vec4 dimensions;", + + "const vec2 Resolution = vec2(1.0,1.0);", //resolution of screen + "uniform vec3 LightPos;", //light position, normalized + "const vec4 LightColor = vec4(1.0, 1.0, 1.0, 1.0);", //light RGBA -- alpha is intensity + "const vec4 AmbientColor = vec4(1.0, 1.0, 1.0, 0.5);", //ambient RGBA -- alpha is intensity + "const vec3 Falloff = vec3(0.0, 1.0, 0.2);", //attenuation coefficients + + "uniform vec3 LightDir;",//" = vec3(1.0, 0.0, 1.0);", + + + "uniform vec2 mapDimensions;",// = vec2(256.0, 256.0);", + + + "void main(void) {", + "vec2 mapCords = vTextureCoord.xy;", + + "vec4 color = texture2D(uSampler, vTextureCoord.st);", + "vec3 nColor = texture2D(displacementMap, vTextureCoord.st).rgb;", + + + "mapCords *= vec2(dimensions.x/512.0, dimensions.y/512.0);", + + "mapCords.y *= -1.0;", + "mapCords.y += 1.0;", + + //RGBA of our diffuse color + "vec4 DiffuseColor = texture2D(uSampler, vTextureCoord);", + + //RGB of our normal map + "vec3 NormalMap = texture2D(displacementMap, mapCords).rgb;", + + //The delta position of light + //"vec3 LightDir = vec3(LightPos.xy - (gl_FragCoord.xy / Resolution.xy), LightPos.z);", + "vec3 LightDir = vec3(LightPos.xy - (mapCords.xy), LightPos.z);", + //Correct for aspect ratio + //"LightDir.x *= Resolution.x / Resolution.y;", + + //Determine distance (used for attenuation) BEFORE we normalize our LightDir + "float D = length(LightDir);", + + //normalize our vectors + "vec3 N = normalize(NormalMap * 2.0 - 1.0);", + "vec3 L = normalize(LightDir);", + + //Pre-multiply light color with intensity + //Then perform "N dot L" to determine our diffuse term + "vec3 Diffuse = (LightColor.rgb * LightColor.a) * max(dot(N, L), 0.0);", + + //pre-multiply ambient color with intensity + "vec3 Ambient = AmbientColor.rgb * AmbientColor.a;", + + //calculate attenuation + "float Attenuation = 1.0 / ( Falloff.x + (Falloff.y*D) + (Falloff.z*D*D) );", + + //the calculation which brings it all together + "vec3 Intensity = Ambient + Diffuse * Attenuation;", + "vec3 FinalColor = DiffuseColor.rgb * Intensity;", + "gl_FragColor = vColor * vec4(FinalColor, DiffuseColor.a);", + //"gl_FragColor = vec4(1.0, 0.0, 0.0, Attenuation);",//vColor * vec4(FinalColor, DiffuseColor.a);", + /* + // normalise color + "vec3 normal = normalize(nColor * 2.0 - 1.0);", + + "vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z );", + + "float lambert = clamp(dot(normal, lightDir), 0.0, 1.0);", + + "float d = sqrt(dot(deltaPos, deltaPos));", + "float att = 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) );", + + "vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att;", + "result *= color.rgb;", + + "gl_FragColor = vec4(result, 1.0);",*/ + + + + "}" + ]; + +} + +/* +void main() { + //sample color & normals from our textures + vec4 color = texture2D(u_texture, v_texCoords.st); + vec3 nColor = texture2D(u_normals, v_texCoords.st).rgb; + + //some bump map programs will need the Y value flipped.. + nColor.g = yInvert ? 1.0 - nColor.g : nColor.g; + + //this is for debugging purposes, allowing us to lower the intensity of our bump map + vec3 nBase = vec3(0.5, 0.5, 1.0); + nColor = mix(nBase, nColor, strength); + + //normals need to be converted to [-1.0, 1.0] range and normalized + vec3 normal = normalize(nColor * 2.0 - 1.0); + + //here we do a simple distance calculation + vec3 deltaPos = vec3( (light.xy - gl_FragCoord.xy) / resolution.xy, light.z ); + + vec3 lightDir = normalize(deltaPos); + float lambert = useNormals ? clamp(dot(normal, lightDir), 0.0, 1.0) : 1.0; + + //now let's get a nice little falloff + float d = sqrt(dot(deltaPos, deltaPos)); + float att = useShadow ? 1.0 / ( attenuation.x + (attenuation.y*d) + (attenuation.z*d*d) ) : 1.0; + + vec3 result = (ambientColor * ambientIntensity) + (lightColor.rgb * lambert) * att; + result *= color.rgb; + + gl_FragColor = v_color * vec4(result, color.a); +} +*/ +PIXI.NormalMapFilter.prototype = Object.create( PIXI.AbstractFilter.prototype ); +PIXI.NormalMapFilter.prototype.constructor = PIXI.NormalMapFilter; + +PIXI.NormalMapFilter.prototype.onTextureLoaded = function() +{ + + this.uniforms.mapDimensions.value.x = this.uniforms.displacementMap.value.width; + this.uniforms.mapDimensions.value.y = this.uniforms.displacementMap.value.height; + + this.uniforms.displacementMap.value.baseTexture.off("loaded", this.boundLoadedFunction) + +} + +/** + * The texture used for the displacemtent map * must be power of 2 texture at the moment + * + * @property map + * @type Texture + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'map', { + get: function() { + return this.uniforms.displacementMap.value; + }, + set: function(value) { + this.uniforms.displacementMap.value = value; + } +}); + +/** + * The multiplier used to scale the displacement result from the map calculation. + * + * @property scale + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'scale', { + get: function() { + return this.uniforms.scale.value; + }, + set: function(value) { + this.uniforms.scale.value = value; + } +}); + +/** + * The offset used to move the displacement map. + * + * @property offset + * @type Point + */ +Object.defineProperty(PIXI.NormalMapFilter.prototype, 'offset', { + get: function() { + return this.uniforms.offset.value; + }, + set: function(value) { + this.uniforms.offset.value = value; + } +}); \ No newline at end of file diff --git a/examples/example 19 - Normal/click.png b/examples/example 19 - Normal/click.png new file mode 100644 index 0000000..b796e52 --- /dev/null +++ b/examples/example 19 - Normal/click.png Binary files differ diff --git a/examples/example 19 - Normal/heineken-names-small-30262.jpg b/examples/example 19 - Normal/heineken-names-small-30262.jpg new file mode 100644 index 0000000..dc699b9 --- /dev/null +++ b/examples/example 19 - Normal/heineken-names-small-30262.jpg Binary files differ diff --git a/examples/example 19 - Normal/index.html b/examples/example 19 - Normal/index.html new file mode 100644 index 0000000..13e6bb6 --- /dev/null +++ b/examples/example 19 - Normal/index.html @@ -0,0 +1,84 @@ + + + + + Sprite Batch + + + + + + + + + + + + + + diff --git a/examples/example 19 - Normal/logo_small.png b/examples/example 19 - Normal/logo_small.png new file mode 100644 index 0000000..3a63544 --- /dev/null +++ b/examples/example 19 - Normal/logo_small.png Binary files differ diff --git a/examples/example 19 - Normal/tinyMaggot.png b/examples/example 19 - Normal/tinyMaggot.png new file mode 100644 index 0000000..c0b1c00 --- /dev/null +++ b/examples/example 19 - Normal/tinyMaggot.png Binary files differ diff --git a/examples/example 2 - SpriteSheet/index.html b/examples/example 2 - SpriteSheet/index.html index fe2c8de..529568f 100644 --- a/examples/example 2 - SpriteSheet/index.html +++ b/examples/example 2 - SpriteSheet/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 2 - SpriteSheet/indexTrim.html b/examples/example 2 - SpriteSheet/indexTrim.html index ce08001..dc9484e 100644 --- a/examples/example 2 - SpriteSheet/indexTrim.html +++ b/examples/example 2 - SpriteSheet/indexTrim.html @@ -13,7 +13,6 @@ diff --git a/examples/example 3 - MovieClip/index.html b/examples/example 3 - MovieClip/index.html index d241fdf..9705c4b 100755 --- a/examples/example 3 - MovieClip/index.html +++ b/examples/example 3 - MovieClip/index.html @@ -13,7 +13,6 @@ diff --git a/examples/example 4 - Balls/index.html b/examples/example 4 - Balls/index.html index 53c52fe..92514f2 100755 --- a/examples/example 4 - Balls/index.html +++ b/examples/example 4 - Balls/index.html @@ -16,7 +16,6 @@
SX: 0
SY: 0
diff --git a/examples/example 5 - Morph/index.html b/examples/example 5 - Morph/index.html index dd246f7..1716043 100755 --- a/examples/example 5 - Morph/index.html +++ b/examples/example 5 - Morph/index.html @@ -14,7 +14,6 @@ diff --git a/examples/example 6 - Interactivity/index.html b/examples/example 6 - Interactivity/index.html index 0ea43eb..2d4a3a5 100644 --- a/examples/example 6 - Interactivity/index.html +++ b/examples/example 6 - Interactivity/index.html @@ -22,7 +22,6 @@ diff --git a/examples/example 7 - Transparent Background/index.html b/examples/example 7 - Transparent Background/index.html index 6c9bdb8..a76d39c 100644 --- a/examples/example 7 - Transparent Background/index.html +++ b/examples/example 7 - Transparent Background/index.html @@ -26,25 +26,21 @@ blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah blah diff --git a/examples/example 8 - Dragging/index.html b/examples/example 8 - Dragging/index.html index 934f671..1cadbc7 100644 --- a/examples/example 8 - Dragging/index.html +++ b/examples/example 8 - Dragging/index.html @@ -14,9 +14,8 @@