Descriptor

lumin.multipack. Descriptor

Describes the pre-generated data used to initialize a
TexturePackResource, which includes one or more JSON
data files corresponding to packed-texture images, as
well as extra parameters and information. Provides
the data and facilities required to access sub-textures.

Constructor

new Descriptor(location, sheets, subTextures, params)

Initialize the fields with the given parameters, guaranteeing the lists are ordered.

Parameters:
Name Type Description
location string
sheets Array.<lumin.multipack.SheetFiles>
subTextures Array.<lumin.multipack.SubTexture>
params lumin.multipack.Params

Methods

(static) Assemble(vMetaDataNames, paramsopt) → {lumin.multipack.Descriptor}

Descriptor factory function that opens JSON files that
correspond to exported, packed-texture images. The multi-
pack descriptor used to initialize a TexturePackResource
is assembled from this information. Note the lists in the
returned object are in alphabetical order.

Parameters:
Name Type Attributes Default Description
vMetaDataNames Array.<string>

A list of texture pack meta data file names.

params lumin.multipack.Params <optional>
Params.DEFAULT

To control the rendering of the images.

Returns:

The information gathered about the texture multi-pack.

Type
lumin.multipack.Descriptor

(static) Assemble(directory, paramsopt) → {lumin.multipack.Descriptor}

Descriptor factory function that scans the given directory on
the local file system (not recursively) for JSON files that
correspond to exported, packed-texture images. The multi-
pack descriptor used to initialize a TexturePackResource
is assembled from this information. Note the lists in the
returned object are in alphabetical order.

Parameters:
Name Type Attributes Default Description
directory string

A directory containing packed-texture images.

params lumin.multipack.Params <optional>
Params.DEFAULT

To control the rendering of the images.

Returns:

The information gathered about the texture multi-pack.

Type
lumin.multipack.Descriptor

empty() → {boolean}

True if no sheets are present in the multi-pack.

Returns:
Type
boolean

getLocation() → {string}

Where the data is located (often a directory); see Assemble().

Returns:
Type
string

getParams() → {lumin.multipack.Params}

Parameters that control the rendering of the textures.

Returns:
Type
lumin.multipack.Params

getSheetCount() → {number}

Number of sheets contained in the multi-pack.

Returns:
Type
number

getSheets() → {Array.<lumin.multipack.SheetFiles>}

List of sheets contained in the texture multi-pack, which is ordered by SheetFiles::index.

Returns:
Type
Array.<lumin.multipack.SheetFiles>

getSubTextureCount() → {number}

Number of sub-textures contained in the multi-pack.

Returns:
Type
number

getSubTextures() → {Array.<lumin.multipack.SubTexture>}

List of sub-textures, which is ordered by SubTexture::name.

Returns:
Type
Array.<lumin.multipack.SubTexture>

lumin.multipack. Descriptor

new Descriptor()

Default initialize all fields

Methods

(static) Assemble(vMetaDataNames, paramsopt) → {lumin.multipack.Descriptor}

Descriptor factory function that opens JSON files that
correspond to exported, packed-texture images. The multi-
pack descriptor used to initialize a TexturePackResource
is assembled from this information. Note the lists in the
returned object are in alphabetical order.

Parameters:
Name Type Attributes Default Description
vMetaDataNames Array.<string>

A list of texture pack meta data file names.

params lumin.multipack.Params <optional>
Params.DEFAULT

To control the rendering of the images.

Returns:

The information gathered about the texture multi-pack.

Type
lumin.multipack.Descriptor

(static) Assemble(directory, paramsopt) → {lumin.multipack.Descriptor}

Descriptor factory function that scans the given directory on
the local file system (not recursively) for JSON files that
correspond to exported, packed-texture images. The multi-
pack descriptor used to initialize a TexturePackResource
is assembled from this information. Note the lists in the
returned object are in alphabetical order.

Parameters:
Name Type Attributes Default Description
directory string

A directory containing packed-texture images.

params lumin.multipack.Params <optional>
Params.DEFAULT

To control the rendering of the images.

Returns:

The information gathered about the texture multi-pack.

Type
lumin.multipack.Descriptor

empty() → {boolean}

True if no sheets are present in the multi-pack.

Returns:
Type
boolean

getLocation() → {string}

Where the data is located (often a directory); see Assemble().

Returns:
Type
string

getParams() → {lumin.multipack.Params}

Parameters that control the rendering of the textures.

Returns:
Type
lumin.multipack.Params

getSheetCount() → {number}

Number of sheets contained in the multi-pack.

Returns:
Type
number

getSheets() → {Array.<lumin.multipack.SheetFiles>}

List of sheets contained in the texture multi-pack, which is ordered by SheetFiles::index.

Returns:
Type
Array.<lumin.multipack.SheetFiles>

getSubTextureCount() → {number}

Number of sub-textures contained in the multi-pack.

Returns:
Type
number

getSubTextures() → {Array.<lumin.multipack.SubTexture>}

List of sub-textures, which is ordered by SubTexture::name.

Returns:
Type
Array.<lumin.multipack.SubTexture>