Skip to content

Commit

Permalink
Add Asset category for API reference (#6051)
Browse files Browse the repository at this point in the history
  • Loading branch information
willeastcott authored Feb 14, 2024
1 parent 559b821 commit 7f9cb58
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/framework/asset/asset-list-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { Asset } from './asset.js';
* ```
*
* @augments EventHandler
* @category Asset
*/
class AssetListLoader extends EventHandler {
/**
Expand Down
2 changes: 2 additions & 0 deletions src/framework/asset/asset-reference.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
* An object that manages the case where an object holds a reference to an asset and needs to be
* notified when changes occur in the asset. e.g. notifications include load, add and remove
* events.
*
* @category Asset
*/
class AssetReference {
/**
Expand Down
1 change: 1 addition & 0 deletions src/framework/asset/asset-registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import { Asset } from './asset.js';
* are provided with an AssetRegistry instance as `app.assets`.
*
* @augments EventHandler
* @category Asset
*/
class AssetRegistry extends EventHandler {
/**
Expand Down
1 change: 1 addition & 0 deletions src/framework/asset/asset.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const VARIANT_DEFAULT_PRIORITY = ['pvr', 'dxt', 'etc2', 'etc1', 'basis'];
* See the {@link AssetRegistry} for details on loading resources from assets.
*
* @augments EventHandler
* @category Asset
*/
class Asset extends EventHandler {
/**
Expand Down
15 changes: 15 additions & 0 deletions src/framework/asset/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,103 +24,118 @@ export const ABSOLUTE_URL = new RegExp(
* Asset type name for animation.
*
* @type {string}
* @category Asset
*/
export const ASSET_ANIMATION = 'animation';

/**
* Asset type name for audio.
*
* @type {string}
* @category Asset
*/
export const ASSET_AUDIO = 'audio';

/**
* Asset type name for image.
*
* @type {string}
* @category Asset
*/
export const ASSET_IMAGE = 'image';

/**
* Asset type name for json.
*
* @type {string}
* @category Asset
*/
export const ASSET_JSON = 'json';

/**
* Asset type name for model.
*
* @type {string}
* @category Asset
*/
export const ASSET_MODEL = 'model';

/**
* Asset type name for material.
*
* @type {string}
* @category Asset
*/
export const ASSET_MATERIAL = 'material';

/**
* Asset type name for text.
*
* @type {string}
* @category Asset
*/
export const ASSET_TEXT = 'text';

/**
* Asset type name for texture.
*
* @type {string}
* @category Asset
*/
export const ASSET_TEXTURE = 'texture';

/**
* Asset type name for textureatlas.
*
* @type {string}
* @category Asset
*/
export const ASSET_TEXTUREATLAS = 'textureatlas';

/**
* Asset type name for cubemap.
*
* @type {string}
* @category Asset
*/
export const ASSET_CUBEMAP = 'cubemap';

/**
* Asset type name for shader.
*
* @type {string}
* @category Asset
*/
export const ASSET_SHADER = 'shader';

/**
* Asset type name for CSS.
*
* @type {string}
* @category Asset
*/
export const ASSET_CSS = 'css';

/**
* Asset type name for HTML.
*
* @type {string}
* @category Asset
*/
export const ASSET_HTML = 'html';

/**
* Asset type name for script.
*
* @type {string}
* @category Asset
*/
export const ASSET_SCRIPT = 'script';

/**
* Asset type name for a container.
*
* @type {string}
* @category Asset
*/
export const ASSET_CONTAINER = 'container';

0 comments on commit 7f9cb58

Please sign in to comment.