Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MaxRectsBin<T>

Type parameters

Hierarchy

  • Bin<T>
    • MaxRectsBin

Implements

Index

Constructors

Properties

Accessors

Methods

Object literals

Constructors

constructor

  • new MaxRectsBin(maxWidth?: number, maxHeight?: number, padding?: number, options?: IOption): MaxRectsBin
  • Parameters

    • Default value maxWidth: number = EDGE_MAX_VALUE
    • Default value maxHeight: number = EDGE_MAX_VALUE
    • Default value padding: number = 0
    • Default value options: IOption = {}

    Returns MaxRectsBin

Properties

Protected _dirty

_dirty: number = 0

Optional data

data: any

freeRects

freeRects: Rectangle[] = []

height

height: number

maxHeight

maxHeight: number

maxWidth

maxWidth: number

padding

padding: number

rects

rects: T[] = []

Optional tag

tag: undefined | string

width

width: number

Accessors

dirty

  • get dirty(): boolean

Methods

add

  • add(rect: T): T | undefined
  • add(width: number, height: number, data: any): T | undefined

clone

repack

  • repack(): T[] | undefined

reset

  • reset(deepReset?: boolean, resetOption?: boolean): void
  • Parameters

    • Default value deepReset: boolean = false
    • Default value resetOption: boolean = false

    Returns void

setDirty

  • setDirty(value?: boolean): void
  • Set bin dirty status

    memberof

    Bin

    Parameters

    • Default value value: boolean = true

    Returns void

Object literals

options

options: object

allowRotation

allowRotation: false = false

border

border: number = 0

exclusiveTag

exclusiveTag: true = true

logic

logic: MAX_EDGE = PACKING_LOGIC.MAX_EDGE

pot

pot: true = true

smart

smart: true = true

square

square: true = true

tag

tag: false = false

Generated using TypeDoc