Skip to content

maxrects-packer / Bin

Abstract Class: Bin<T> ​

Defined in: abstract-bin.ts:15

Extended by ​

Type Parameters ​

T ​

T extends IRectangleInput

Implements ​

Constructors ​

Constructor ​

new Bin<T>(): Bin<T>

Returns ​

Bin<T>

Properties ​

_dirty ​

protected _dirty: number = 0

Defined in: abstract-bin.ts:31


data? ​

optional data?: any

Defined in: abstract-bin.ts:28


freeRects ​

freeRects: IRectangle[]

Defined in: abstract-bin.ts:20

Implementation of ​

IBin.freeRects


height ​

height: number

Defined in: abstract-bin.ts:17

Implementation of ​

IBin.height


maxHeight ​

maxHeight: number

Defined in: abstract-bin.ts:19

Implementation of ​

IBin.maxHeight


maxWidth ​

maxWidth: number

Defined in: abstract-bin.ts:18

Implementation of ​

IBin.maxWidth


options ​

options: IOption

Defined in: abstract-bin.ts:22

Implementation of ​

IBin.options


rects ​

rects: T[]

Defined in: abstract-bin.ts:21

Implementation of ​

IBin.rects


tag? ​

optional tag?: string

Defined in: abstract-bin.ts:29


width ​

width: number

Defined in: abstract-bin.ts:16

Implementation of ​

IBin.width

Accessors ​

dirty ​

Get Signature ​

get dirty(): boolean

Defined in: abstract-bin.ts:32

Returns ​

boolean

Methods ​

add() ​

Call Signature ​

abstract add(rect): T | undefined

Defined in: abstract-bin.ts:23

Parameters ​
rect ​

T

Returns ​

T | undefined

Call Signature ​

abstract add(width, height, data): T | undefined

Defined in: abstract-bin.ts:24

Parameters ​
width ​

number

height ​

number

data ​

any

Returns ​

T | undefined


clone() ​

abstract clone(): Bin<T>

Defined in: abstract-bin.ts:47

Returns ​

Bin<T>


repack() ​

abstract repack(): T[] | undefined

Defined in: abstract-bin.ts:26

Returns ​

T[] | undefined


reset() ​

abstract reset(deepRest): void

Defined in: abstract-bin.ts:25

Parameters ​

deepRest ​

boolean

Returns ​

void


setDirty() ​

setDirty(value?): void

Defined in: abstract-bin.ts:38

Set bin dirty status

Parameters ​

value? ​

boolean = true

Returns ​

void