Skip to main content
2 of 3
Translated.
Vaillancourt
  • 16.4k
  • 17
  • 55
  • 61

https://codepen.io/ysraeljmm/pen/rrbrQJ

Function toVertex.

The first parameter is an element of type SVG, it can be a path, rect, circle, etc. The second parameter is the distance of segments. Returns an array as a javascript object, which is generally used in Phaser or matter js.