Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I hack Packery.js to create circular bin packing?

Fuseki.net's rect this is implemented in python (more tests)

I'm interested in a result like in the image above (implemented in python) using the Packery.js jQuery plugin for js/DOM based bin packing. Packery is built to work from left to right, top to bottom, but I wonder if using a circular bounding box rather the viewport as its boundaries could do the trick.

Ultimately I want to use this to present many image thumbnails with a wide array of sizes and proportions.

Any code examples or other pointers would be highly appreciated.

Here's a CodePen for you to play with:

like image 535
Mushon Avatar asked Dec 26 '22 14:12

Mushon


1 Answers

Yes! See https://github.com/metafizzy/packery/issues/62

In the works.

Packery center out

Development is on the center-out-corner branch. It's in an experimental phase. While this is a neat visual demo, I'm unsure how practical its application is.

like image 96
desandro Avatar answered Dec 28 '22 05:12

desandro