simple-square-packing
TypeScript icon, indicating that this package has built-in type declarations

1.1.0 • Public • Published

Simple Square Packing Algorithm

import {packSquares} from './index';
 
// The values which you want to show.
const values = [4, 3, 1, 0.2];
 
// The sizes of the squares are relative to this value. You can use it if you
// want to render multiple figures which need to be sized relatively
// to each other.
const maxValue = 7;
 
const result = packSquares(values, maxValue);

Consult the source file to see which fields are available in the result.

Readme

Keywords

none

Package Sidebar

Install

npm i simple-square-packing

Weekly Downloads

2

Version

1.1.0

License

MIT

Unpacked Size

9.27 kB

Total Files

5

Last publish

Collaborators

  • werehamster