Playing with radialCircle

This commit is contained in:
Luis Leiva 2017-11-07 08:43:20 +01:00
parent d57c92f37c
commit 3c5e2ee4ea
1 changed files with 9 additions and 7 deletions

View File

@ -309,13 +309,15 @@
this.graphics.closePath(); this.graphics.closePath();
return this; return this;
}, },
// experimental /**
radialCircle: function(x,y,radius,color,glowSize){ * Experimental.
var g = this.graphics.createRadialGradient(x,y,radius,x,y,glowSize); * @ignore
g.addColorStop(0,color); */
g.addColorStop(1.0,"rgba(0,0,0,0)"); radialCircle: function(x,y,radius,glowSize,color1,color2) {
this.graphics.fillStyle = g; var g = this.graphics.createRadialGradient(x,y,radius,x,y, glowSize || 5);
this.fillCircle(x,y,radius); g.addColorStop(0, color1 || this.graphics.fillStyle);
g.addColorStop(1, color2 || 'white');
this.beginFill(g).fillCircle(x,y,radius).endFill();
return this; return this;
}, },
/** /**