https://github.com/appfigures/pack.js
Numerical packing algorithm for Javascript
https://github.com/appfigures/pack.js
Last synced: 4 months ago
JSON representation
Numerical packing algorithm for Javascript
- Host: GitHub
- URL: https://github.com/appfigures/pack.js
- Owner: appfigures
- License: mit
- Created: 2014-03-27T20:38:19.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2014-03-27T21:00:53.000Z (about 12 years ago)
- Last Synced: 2024-12-30T21:52:17.858Z (over 1 year ago)
- Language: JavaScript
- Homepage: http://appfigures.github.io/pack.js
- Size: 270 KB
- Stars: 2
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pack.js
Pack.js is a shape packing library for Javascript that uses a numerical packing algorithm. Pack.js isn't optimal (it doesn't produce the most space-eficient results), but due to its numeric nature it's great for creating more organic looking graphics. It's useful for creating interesting-looking visualizations such as word clouds.

[Demo](http://appfigures.github.io/pack.js/example)
# How does it work
We use a simple verlet-based physics simulation under the hood. Gravity wells can be used to cluster objects around a specific point and collision detection to prevent shapes from intersecting.