Properties:
Name | Type | Description |
---|---|---|
config |
Record<string, any> |
A config to adjust the parser |
load |
(url: string, loadAsset: LoadAsset<META_DATA>, loader: PIXI.Loader) => Promise<T> |
This is the promise that loads the URL provided resolves with a loaded asset if returned by the parser. |
parse |
(asset: ASSET, loadAsset: META_DATA<LoadAsset>, loader: PIXI.Loader) => Promise<T> |
Gets called on the asset it testParse passes. Useful to convert a raw asset into something more useful than |
test |
(url: string, loadAsset: LoadAsset<META_DATA>, loader: PIXI.Loader) => boolean |
each URL to load will be tested here, if the test is passed the assets are loaded using the load function below. Good place to test for things like file extensions! |
testParse |
(asset: ASSET, loadAsset: META_DATA<LoadAsset>, loader: PIXI.Loader) => Promise<boolean> |
This function is used to test if the parse function should be run on the asset If this returns true then parse is called with the asset |
unload |
(asset: ASSET, loadAsset: META_DATA<LoadAsset>, loader: PIXI.Loader) => void |
If an asset is parsed using this parser, the unload function will be called when the user requests an asset to be unloaded. This is useful for things like sounds or textures that can be unloaded from memory |
Members
A config to adjust the parser
load (url: string, loadAsset: LoadAsset<META_DATA>, loader: PIXI.Loader) => Promise<T>
This is the promise that loads the URL provided resolves with a loaded asset if returned by the parser.
parse (asset: ASSET, loadAsset: META_DATA<LoadAsset>, loader: PIXI.Loader) => Promise<T>
Gets called on the asset it testParse passes. Useful to convert a raw asset into something more useful than
test (url: string, loadAsset: LoadAsset<META_DATA>, loader: PIXI.Loader) => boolean
each URL to load will be tested here, if the test is passed the assets are loaded using the load function below. Good place to test for things like file extensions!
testParse (asset: ASSET, loadAsset: META_DATA<LoadAsset>, loader: PIXI.Loader) => Promise<boolean>
This function is used to test if the parse function should be run on the asset If this returns true then parse is called with the asset
unload (asset: ASSET, loadAsset: META_DATA<LoadAsset>, loader: PIXI.Loader) => void
If an asset is parsed using this parser, the unload function will be called when the user requests an asset to be unloaded. This is useful for things like sounds or textures that can be unloaded from memory