This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
maxrects-lua [2021/02/13 08:21] muragami |
maxrects-lua [2021/02/13 10:21] (current) muragami [:insertCollection(collect,sort)] |
||
|---|---|---|---|
| Line 130: | Line 130: | ||
| Inserts a rectangle into the collection, using the algorithm to assign a location. If the rectangle can't fit, returns false. | Inserts a rectangle into the collection, using the algorithm to assign a location. If the rectangle can't fit, returns false. | ||
| + | ==== : | ||
| + | |||
| + | * **rect**: The rectangle to insert. X/ | ||
| + | |||
| + | * **return**: Boolean. True if the rectangle was inserted, False if it didn't fit. | ||
| + | |||
| + | Inserts a rectangle into the collection, using the algorithm to assign a location. If the rectangle can't fit, returns false. Copies .data into the stored node in the collection. | ||
| + | |||
| + | ==== : | ||
| + | |||
| + | * **collect**: | ||
| + | * **// | ||
| + | |||
| + | * **return**: Boolean, Number. True if all were inserted, False if only some fit. The number is the amount added. | ||
| + | |||
| + | Inserts rectangles into the collection, from an array table. If you define sort to one of: ' | ||
| ==== : | ==== : | ||
| Line 163: | Line 179: | ||
| Returns the algorithm in use by the packer. The options are: ' | Returns the algorithm in use by the packer. The options are: ' | ||
| + | ===== Simple LÖVE Texture Packer ===== | ||
| + | TODO! | ||