teo Posted April 12, 2016 Share Posted April 12, 2016 Hi, I use a Graphics object as a Sprite mask. How can I read the value of a pixel from the mask ? (given its x and y coordinates) Thanks Teo var sprite; var mask; function create() { sprite = game.add.sprite(0, 0, 'smoke'); mask = game.add.graphics(0, 0); mask.beginFill(0xffffff); mask.drawCircle(100, 100, 50); sprite.mask = mask; } Link to comment Share on other sites More sharing options...
Recommended Posts