Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/heineiuo/fibonacci-layout

Fibonacci layout algorithm (tiling, square)
https://github.com/heineiuo/fibonacci-layout

algorithm fibonacci layout

Last synced: about 2 months ago
JSON representation

Fibonacci layout algorithm (tiling, square)

Awesome Lists containing this project

README

        

# fibonacci-layout

===

fibonacci layout (斐波那契布局算法)

## usage

```
npm install fibonacci-layout
```

```javascript
const fbLayout = require('fibonacci-layout')

const layout = fbLayout(8)

// =>

{ n: 21,
width: 34,
height: 21,
direction: 'left',
nodes:
[ [ 0, 0, 1, 1 ],
[ 0, 1, 1, 1 ],
[ 0, -2, 2, 2 ],
[ -3, -2, 3, 3 ],
[ -3, 1, 5, 5 ],
[ 2, -2, 8, 8 ],
[ -3, -15, 13, 13 ],
[ -24, -15, 21, 21 ] ] }

```

## License
MIT