Class: Atlasify
Constructors
constructor
• new Atlasify(options
)
Creates an instance of Atlasify.
memberof
Atlasify
Parameters
Name | Type | Description |
---|---|---|
options | Options | Atlasify Options class |
Defined in
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
exporter
• get
exporter(): Exporter
Returns
Defined in
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
Defined in
Methods
addBuffers
▸ addBuffers(buffers
, callback
): void
Parameters
Name | Type |
---|---|
buffers | Buffer [] |
callback | (atlas : Atlas [], spritesheets : Spritesheet []) => void |
Returns
void
Defined in
addURLs
▸ addURLs(paths
, callback?
): Promise
<Atlasify
>
Add arrays of pathalike images url and do packing
memberof
Atlasify
Parameters
Name | Type |
---|---|
paths | string [] |
callback? | (err? : Error , atlas? : Atlas [], spritesheets? : Spritesheet []) => void |
Returns
Promise
<Atlasify
>
Defined in
load
▸ load(pathalike
, overrides?
): Promise
<Atlasify
>
Parameters
Name | Type | Default value |
---|---|---|
pathalike | string | undefined |
overrides | any | null |
Returns
Promise
<Atlasify
>
Defined in
next
▸ next(): number
Enclose previous packing bin and start a new one.
memberof
Atlasify
Returns
number
Defined in
pack
▸ pack(callback?
): Promise
<Atlasify
>
Parameters
Name | Type |
---|---|
callback? | (err? : Error , atlas? : Atlas [], spritesheets? : Spritesheet []) => void |
Returns
Promise
<Atlasify
>
Defined in
save
▸ save(humanReadable?
): Promise
<string
>
Async serialize current project & settings to string
memberof
Atlasify
Parameters
Name | Type |
---|---|
humanReadable? | boolean |
Returns
Promise
<string
>
}
Defined in
▸ save(humanReadable?
, pathalike?
): Promise
<boolean
>
Asycn save current project & settings to file
memberof
Atlasify
Parameters
Name | Type |
---|---|
humanReadable? | boolean |
pathalike? | string |
Returns
Promise
<boolean
>
}
Defined in
Load
▸ Static
Load(pathalike
, overrides?
): Promise
<Atlasify
>
Parameters
Name | Type | Default value |
---|---|---|
pathalike | string | undefined |
overrides | any | null |
Returns
Promise
<Atlasify
>