Search the Community
Showing results for tags 'radialGradient'.
-
Hi, I'm new to Pixi, I want to make a star background like this: But I can't find a way to make 'createRadialGradient' in Pixi, so how to create a star like that? please help.
-
Hey, I'm having from trouble with the BitmapData module. When I assign a radial gradient to Phaser.BitmapData.ctx.fillstyle, nothing I draw renders to the screen. The code below in in the 'create' function. var gradient = bitmap.ctx.createRadialGradient(x,y,0,x,y,radius);gradient.addColorStop(0.5,"white");gradient.addColorStop(0.4,color);gradient.addColorStop(1,"black");bitmap.ctx.fillStyle = gradient;bitmap.circle(bitmap.width/2,bitmap.height/2,10);I know my other code is working because when I make the fillStyle = '#FFFFFF', I get a white ball. Does the BitmapData module allow me to set radial gradients as the fillStyle? It is my understanding that anything I can do on a canvas I can do with BitmapData. Or is there something I'm overlooking? I need help! Please and Thank You.
- 1 reply
-
- bitmapData
- fillstyle
-
(and 4 more)
Tagged with: