Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vvenv/tilegrid
Combine small rects into a big rect.
https://github.com/vvenv/tilegrid
Last synced: about 5 hours ago
JSON representation
Combine small rects into a big rect.
- Host: GitHub
- URL: https://github.com/vvenv/tilegrid
- Owner: vvenv
- Created: 2014-09-25T06:45:34.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-12-31T10:15:42.000Z (almost 10 years ago)
- Last Synced: 2024-10-27T00:09:56.893Z (19 days ago)
- Language: JavaScript
- Homepage:
- Size: 191 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 42
-
Metadata Files:
- Readme: README.md
- Changelog: HISTORY.md
Awesome Lists containing this project
README
# tilegrid
[![spm version](http://spmjs.io/badge/tilegrid)](http://spmjs.io/package/tilegrid)
> Combine small rects into a big rect.
![](tilegrid.gif)
## 背景
贴瓷砖,在如下尺寸的场地(表格,允许合并单元格)
```
┌─┬─┬─┬─┐
├─┼─┼─┼─┤
└─┴─┴─┴─┘
```中,放入如下随机排列的方形与矩形,要求铺满并尽量保持原来顺序
```
■
■
■
■
■■
■■(翻转90°)
```## 安装
```
$ spm install tilegrid --save
```## 使用
```js
var tilegrid = require('tilegrid');
// use tilegrid
```