Jump to content

Fill a shape (ellipse) with a gradient


mikko109
 Share

Recommended Posts

Hi, I am facing a problem that I can't seem to find a solution online.

I have a basic game app with an ellipse that goes up and down automatically. What I try to accomplish is to have a gradient that fills the background and another that fills the ellipse. It is mostly for cosmetic purposes, but it is to fit the overall style I am looking for. I wanted to join an image of the style I am looking for, but there's a bug on the forum that prevents me from doing it. Sorry.

I basically created my ellipse as a shape, but I can't seem to find how to add more than a flat color. How can I create a gradient to fill shapes? 

this.ellipse = this.add.ellipse(game.config.width / 2game.config.height / 2sizesize, color);
Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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