charlie_says Posted September 3, 2018 Share Posted September 3, 2018 Hi, I'm trying to do something similar to this example: https://phaser.io/examples/v2/bitmapdata/radial-gradient But, I'm working in TypeScript, and it doesn't 'like' the last part: bmd.circle(outerCircle.x, outerCircle.y, outerCircle.radius, grd); gets me the error: Argument of type 'CanvasGradient' is not assignable to parameter of type 'string'. Any ideas how I resolve this? Link to comment Share on other sites More sharing options...
charlie_says Posted September 3, 2018 Author Share Posted September 3, 2018 ok, should anyone come across this, and be interested, I've fixed it by drawing directly to the context. What I was trying to do was a little different, so it's not a straight replacement of the above. bmd.context.fillStyle = grd; bmd.context.fillRect(0,0,this.game.width,this.game.height); Link to comment Share on other sites More sharing options...
Recommended Posts