Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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)
- Host: GitHub
- URL: https://github.com/heineiuo/fibonacci-layout
- Owner: heineiuo
- Created: 2017-06-12T05:10:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T06:14:07.000Z (almost 7 years ago)
- Last Synced: 2024-11-09T05:33:48.056Z (2 months ago)
- Topics: algorithm, fibonacci, layout
- Language: JavaScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nodejs-pure-js - fibonacci-layout
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