Skip to main content

Class: Atlasify

Constructors

constructor

new Atlasify(options)

Creates an instance of Atlasify.

memberof Atlasify

Parameters

NameTypeDescription
optionsOptionsAtlasify Options class

Defined in

atlasify.ts:190

Properties

options

options: Options

Accessors

atlas

get atlas(): Atlas[]

Get all atlas/image array

note: this will only available with all async image load & packing done.

readonly

memberof Atlasify

Returns

Atlas[]

Defined in

atlasify.ts:559


exporter

get exporter(): Exporter

Returns

Exporter

Defined in

atlasify.ts:575


spritesheets

get spritesheets(): Spritesheet[]

Get all serialized spritesheets array.

note: this will only available with all async image load & packing done.

readonly

memberof Atlasify

Returns

Spritesheet[]

Defined in

atlasify.ts:572

Methods

addBuffers

addBuffers(buffers, callback): void

Parameters

NameType
buffersBuffer[]
callback(atlas: Atlas[], spritesheets: Spritesheet[]) => void

Returns

void

Defined in

atlasify.ts:377


addURLs

addURLs(paths, callback?): Promise<Atlasify>

Add arrays of pathalike images url and do packing

memberof Atlasify

Parameters

NameType
pathsstring[]
callback?(err?: Error, atlas?: Atlas[], spritesheets?: Spritesheet[]) => void

Returns

Promise<Atlasify>

Defined in

atlasify.ts:210


load

load(pathalike, overrides?): Promise<Atlasify>

Parameters

NameTypeDefault value
pathalikestringundefined
overridesanynull

Returns

Promise<Atlasify>

Defined in

atlasify.ts:476


next

next(): number

Enclose previous packing bin and start a new one.

memberof Atlasify

Returns

number

Defined in

atlasify.ts:387


pack

pack(callback?): Promise<Atlasify>

Parameters

NameType
callback?(err?: Error, atlas?: Atlas[], spritesheets?: Spritesheet[]) => void

Returns

Promise<Atlasify>

Defined in

atlasify.ts:288


save

save(humanReadable?): Promise<string>

Async serialize current project & settings to string

memberof Atlasify

Parameters

NameType
humanReadable?boolean

Returns

Promise<string>

}

Defined in

atlasify.ts:399

save(humanReadable?, pathalike?): Promise<boolean>

Asycn save current project & settings to file

memberof Atlasify

Parameters

NameType
humanReadable?boolean
pathalike?string

Returns

Promise<boolean>

}

Defined in

atlasify.ts:408


Load

Static Load(pathalike, overrides?): Promise<Atlasify>

Parameters

NameTypeDefault value
pathalikestringundefined
overridesanynull

Returns

Promise<Atlasify>

Defined in

atlasify.ts:471