Jump to content

Phaser .mask and Safari ?!


Nikow
 Share

Recommended Posts

Hello,

 

I remember reading Pixi can handle only 1 single mask on a canvas, while it can have several on WebGL.

 

Maybe your game runs on WebGL in Firefox & Chrome but not in Safari ?

 

Hi ! I test again, phaser is in WEBGL render mode on chrome and firefox, but in CANVAS mode on safari and IE, i think it s the prob with the mask, but i have an error if i put phaser.WEBGL mode everytime ...?

 

Do you know why ?

Link to comment
Share on other sites

My code is :

 

Creating the mask

graphics = game.add.graphics(0, 0);graphics.lineStyle(6, 0x33FF00);graphics.moveTo(390,400);graphics.lineTo(valBar, 400);bar.mask = graphics;

Updating the mask : 

graphics.clear();graphics.lineStyle(6, 0x33FF00);graphics.moveTo(360,400);graphics.lineTo(valBar, 400);
Link to comment
Share on other sites

Hi,

 

What is your error ? I would say your versions of IE and Safari does not support WebGL if you got an error msg, but it's always useful if you can provide it.

 

Can you try alpha masking with BitmapData ? The technical requirements may not be the same, but you'll have to adjust your code a little.

 

http://examples.phaser.io/_site/view_full.html?d=bitmapdata&f=alpha+mask.js&t=alpha%20mask

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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