Skip to content
TypeScript HTML JavaScript Nix
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github/workflows
example
src
.gitignore
.npmignore
LICENSE
README.md
package-lock.json
package.json
rollup.config.js
shell.nix
thumbnail.png
tsconfig.json

README.md

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.

You can’t perform that action at this time.