Jump to content

Dashed line / border in Phaser 3


Archydemon
 Share

Recommended Posts

I'm looking for a way of creating an enclosed perimeter with dashed border. 
It will contain only vertical and horizontal lines, but the path can be complex.
For example let's just imagine I need to draw Tetris figures (no fill, just perimeter) with dashed line.

As far as I can see in the documentation figure stroke and lines can only change color and alpha. 

Any suggestions of achieving the dashed line effect are appreciated.
Thanks in advance.

Link to comment
Share on other sites

UPD: I have found an extremely easy but dirty way of doing this.
Classic 2d canvas has built-in function for drawing dashed lines.
It will work for me as I need static lines. But I don't really like the idea of creating second canvas element just for creating a layer with dashed lines.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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