Class Index | File Index

Classes


Class DefaultTexturesCatalog


Extends TexturesCatalog.

Defined in: DefaultTexturesCatalog.js.

Class Summary
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 Summary
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 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 or texturesCatalogUrl
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}

© Copyright 2024 Emmanuel PUYBARET / eTeks
Distributed under GNU General Public License
Documentation generated by JsDoc Toolkit 2.4.0 on Thu Apr 04 2024 17:30:25 GMT+0200 (CEST)