Jump to content

[BUG] Masking TileSprites crashing in Canvas renderer


richpixel
 Share

Recommended Posts

PIXI is crashing when attempting to render a TileSprite that has a mask, in the canvas renderer.

(Phaser 2.2.1, PIXI 2.2.0, Canvas)

 

The call stack winds up here:

 

PIXI.CanvasMaskManager.prototype.pushMask = function(maskData, renderSession)

 

and the line that fails:

 

var context = renderSession.context;

context.save(); // crash

 

After a quick glance of the code, it appears that the param 'renderSesstion' is actually a 'context' already (CanvasRenderingContext2D) so it fails to get a context out of a context :(

So it seems its just passing the wrong param to here and an easy fix.

 

 

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...