Mat-eria Posted February 16, 2016 Share Posted February 16, 2016 I search in the forum, but did not find me it is impossible to draw a rectangle stroke. The phaser did not see such a possibility (if not, please correct me). And of course I wrote does not work as (Do not know how this is done in webgl), but the canvas nuzhet contest (the problem is that I don `t know how to pass into another file, which resuet grid) Link to comment Share on other sites More sharing options...
Cudabear Posted February 16, 2016 Share Posted February 16, 2016 Hi, Easiest way to stroke a rectangle onto the canvas (while working with WebGL as well) is probably to use bitmapdata. Think of it like a separate 2D canvas that you can use functions like strokeRectangle on. Then, you can assign it to a sprite or just have it cover the entire screen while drawing on a portion of it, up to you. Link to comment Share on other sites More sharing options...
Mat-eria Posted March 28, 2016 Author Share Posted March 28, 2016 It turned out there is no problem. If suddenly someone will need addressing, like me, then this problem is solved so bmd = game.add.bitmapData (40,40); bmd.ctx.beginPath (); bmd.ctx.rect (0,0, sizeX, sizeY); bmd.ctx.strokeStyle = sStyle; bmd.ctx.stroke (); Link to comment Share on other sites More sharing options...
Recommended Posts