richpixel Posted January 13, 2015 Share Posted January 13, 2015 I'm creating a mask for my sprite using a Phaser.Graphics object - the mask is a collection of rectangles and circles, and it works fine. I then tried to add a filled bezier curve with the method bezierCurveTo(). If my graphics object is not set as a the mask, I can see the filled curve appear in my graphics. But when I use it as a mask for another sprite, the filled curve does not appear to be part of the shape With mask applied - no bezier curve is seen Plain graphics object, not used as a mask. The filled bezier curve is visible on the left. Is this just a rule that bezier curves can't be used in masks? Or is there some other way to make this work...? Link to comment Share on other sites More sharing options...
GameDemon Posted October 30, 2015 Share Posted October 30, 2015 Sadly this still doesn't work in 2.4.4, demo:function create() { var graphics2 = game.add.graphics(0,0); graphics2.beginFill(0xff0000, .5); graphics2.drawRect(0,0, 800, 600); var graphics = game.add.graphics(0,0); graphics.beginFill(0x00ff00, .5); // boxes graphics.drawRect(204-24,0, 24, 432);graphics.drawRect(12,484,128-12,24);// curve graphics.moveTo(128,484);graphics.lineTo(128,508);graphics.quadraticCurveTo(204, 508, 204,432);graphics.lineTo(180,432);graphics.quadraticCurveTo(180, 484, 128,484);graphics2.mask = graphics;} Link to comment Share on other sites More sharing options...
jmp909 Posted October 30, 2015 Share Posted October 30, 2015 i've made a sandbox for that to help you report it http://phaser.io/sandbox/OOsWLxdy/play Link to comment Share on other sites More sharing options...
GameDemon Posted October 31, 2015 Share Posted October 31, 2015 That is a lovely demo :-) I submitted an issue:https://github.com/photonstorm/phaser/issues/2185 Link to comment Share on other sites More sharing options...
Recommended Posts