Jump to content

Drawing a Mask


rickbross
 Share

Recommended Posts

Hey guys, my name is Rick and I have been playing around with Phaser for the past few days.

 

I am looking to build a lotto scratcher type game. I need to be able to draw directly to the mask layer.

 

I have found a few different things on the forums that should be able to help me.

  • Alpha Mask - Makes sense.
  • BitmapData - Not sure how to add to this based on user input. To my knowledge, this IS my mask. Right..?
  • globalCompositeOperation - No idea what this even is.

I dont want to it be blocky like this.... http://examples.phaser.io/_site/view_full.html?d=display&f=bitmapdata+draw.js&t=bitmapdata%20draw

 

I don't want to add circles, I want to add a stroke.I want to be able to take the path the finger, give it a width (like how you could control the brush thickness in Photoshop), and then add it directly to the mask.

 

How would I go upon doing this, have people done this before?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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