flbulgarelli / headbreaker

:jigsaw: :exploding_head: Jigsaw puzzles framework for JavaScript

Home Page:https://flbulgarelli.github.io/headbreaker/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to find the effective width and height of a piece?

anotherstarburst opened this issue · comments

commented

I'm just experimenting with this library. It's pretty cool - thanks for putting in the work!

Is there a way to get the width and height of an individual puzzle piece (with a rounded outline) - including the slot and tab?

I see shape.attrs has points. It looks like those are drawn in https://github.com/flbulgarelli/headbreaker/blob/master/src/outline.js but I can't see a good way to extract the effective width / height from shape.attrs itself.