Class DefaultTexturesCatalog
Extends
TexturesCatalog.
Defined in: DefaultTexturesCatalog.js.
Constructor Attributes | Constructor Name and Description |
---|---|
DefaultTexturesCatalog(preferences, texturesCatalogUrls, texturesResourcesUrlBase)
Creates a default textures catalog read through resources referenced by
preferences or
from texturesCatalogUrls if called with two parameters |
Method Attributes | Method Name and Description |
---|---|
Returns the textures libraries at initialization.
|
|
readTexture(resource, index, texturesCatalogUrl, texturesResourcesUrlBase)
Returns the texture at the given
index of a
localized resource bundle. |
|
readTexturesCategory(resource, index)
Returns the category of a texture at the given
index of a
localized resource bundle. |
- Methods borrowed from class TexturesCatalog:
- add, addTexturesListener, getCategories, getCategoriesCount, getCategory, removeTexturesListener
Class Detail
DefaultTexturesCatalog(preferences, texturesCatalogUrls, texturesResourcesUrlBase)
Creates a default textures catalog read through resources referenced by
Author: Emmanuel Puybaret.
preferences
or
from texturesCatalogUrls
if called with two parameters
Author: Emmanuel Puybaret.
- Parameters:
- {UserPreferences} preferences Optional
- {Array} texturesCatalogUrls Optional
- {String} texturesResourcesUrlBase Optional
Method Detail
{Object}
getLibraries()
Returns the textures libraries at initialization.
- Returns:
- {Object}
{CatalogTexture}
readTexture(resource, index, texturesCatalogUrl, texturesResourcesUrlBase)
Returns the texture at the given
index
of a
localized resource
bundle.
- Parameters:
- {Object[]} resource
- a resource bundle
- {number} index
- the index of the read texture
- {string} texturesCatalogUrl
- the URL from which texture resources will be loaded
or
null
if it's read from current classpath. - {string} texturesResourcesUrlBase
- the URL used as a base to build the URL to texture resources
or
null
if it's read from current classpath ortexturesCatalogUrl
- Throws:
- MissingResourceException if mandatory keys are not defined.
- Returns:
- {CatalogTexture} the read texture or
null
if the texture at the given index doesn't exist.
{TexturesCategory}
readTexturesCategory(resource, index)
Returns the category of a texture at the given
index
of a
localized resource
bundle.
- Parameters:
- {Object[]} resource
- {number} index
- Throws:
- MissingResourceException if mandatory keys are not defined.
- Returns:
- {TexturesCategory}