Class: ResourceMap

gEngine.ResourceMap

new ResourceMap()

Default Constructor
Source:

Methods

(static) asyncLoadCompleted(rName, loadedAsset) → {void}

Callback for when reource is loaded into the ResourceMap
Parameters:
Name Type Description
rName String
loadedAsset File asset to load into ResourceMap
Source:
Returns:
Type
void

(static) asyncLoadCompleted(rName, loadedAsset) → {void}

Callback for when reource is loaded into the ResourceMap
Parameters:
Name Type Description
rName String
loadedAsset File asset to load into ResourceMap
Source:
Returns:
Type
void

(static) asyncLoadRequested(rName) → {void}

Register one more resource to load
Parameters:
Name Type Description
rName String name of resource to load
Source:
Returns:
Type
void

(static) asyncLoadRequested(rName) → {void}

Register one more resource to load
Parameters:
Name Type Description
rName String name of resource to load
Source:
Returns:
Type
void

(static) incAssetRefCount(rName) → {void}

Increment the refrence count of asser rName
Parameters:
Name Type Description
rName String name of asset to increment refrence count
Source:
Returns:
Type
void

(static) incAssetRefCount(rName) → {void}

Increment the refrence count of asser rName
Parameters:
Name Type Description
rName String name of asset to increment refrence count
Source:
Returns:
Type
void

(static) isAssetLoaded(rName) → {Boolean}

Returns if asset is loaded into map
Parameters:
Name Type Description
rName String name of asset
Source:
Returns:
true if rName is loaded in ResourceMap
Type
Boolean

(static) isAssetLoaded(rName) → {Boolean}

Returns if asset is loaded into map
Parameters:
Name Type Description
rName String name of asset
Source:
Returns:
true if rName is loaded in ResourceMap
Type
Boolean

(static) MapEntry(rName) → {MapEntry}

ResourceMap node containing name and refrence count of resource
Parameters:
Name Type Description
rName String
Source:
Returns:
Type
MapEntry

(static) MapEntry(rName) → {MapEntry}

ResourceMap node containing name and refrence count of resource
Parameters:
Name Type Description
rName String
Source:
Returns:
Type
MapEntry

(static) retrieveAsset(rName) → {File}

Return the asset of rName
Parameters:
Name Type Description
rName String name of asset to return
Source:
Returns:
asset associtated to rName
Type
File

(static) retrieveAsset(rName) → {File}

Return the asset of rName
Parameters:
Name Type Description
rName String name of asset to return
Source:
Returns:
asset associtated to rName
Type
File

(static) setLoadCompleteCallback(funct) → {void}

Make sure to set the callback _AFTER_ all load commands are issued
Parameters:
Name Type Description
funct function callback Function
Source:
Returns:
Type
void

(static) setLoadCompleteCallback(funct) → {void}

Make sure to set the callback _AFTER_ all load commands are issued
Parameters:
Name Type Description
funct function callback Function
Source:
Returns:
Type
void

(static) unloadAsset(rName) → {Number}

Remove the reference to allow associated memory

be available for subsequent garbage collection

Parameters:
Name Type Description
rName String name of asset to unload
Source:
Returns:
Refrence count of asset
Type
Number

(static) unloadAsset(rName) → {Number}

Remove the reference to allow associated memory

be available for subsequent garbage collection

Parameters:
Name Type Description
rName String name of asset to unload
Source:
Returns:
Refrence count of asset
Type
Number

gEngine.ResourceMap

new ResourceMap()

Default Constructor
Source:

Methods

(static) asyncLoadCompleted(rName, loadedAsset) → {void}

Callback for when reource is loaded into the ResourceMap
Parameters:
Name Type Description
rName String
loadedAsset File asset to load into ResourceMap
Source:
Returns:
Type
void

(static) asyncLoadCompleted(rName, loadedAsset) → {void}

Callback for when reource is loaded into the ResourceMap
Parameters:
Name Type Description
rName String
loadedAsset File asset to load into ResourceMap
Source:
Returns:
Type
void

(static) asyncLoadRequested(rName) → {void}

Register one more resource to load
Parameters:
Name Type Description
rName String name of resource to load
Source:
Returns:
Type
void

(static) asyncLoadRequested(rName) → {void}

Register one more resource to load
Parameters:
Name Type Description
rName String name of resource to load
Source:
Returns:
Type
void

(static) incAssetRefCount(rName) → {void}

Increment the refrence count of asser rName
Parameters:
Name Type Description
rName String name of asset to increment refrence count
Source:
Returns:
Type
void

(static) incAssetRefCount(rName) → {void}

Increment the refrence count of asser rName
Parameters:
Name Type Description
rName String name of asset to increment refrence count
Source:
Returns:
Type
void

(static) isAssetLoaded(rName) → {Boolean}

Returns if asset is loaded into map
Parameters:
Name Type Description
rName String name of asset
Source:
Returns:
true if rName is loaded in ResourceMap
Type
Boolean

(static) isAssetLoaded(rName) → {Boolean}

Returns if asset is loaded into map
Parameters:
Name Type Description
rName String name of asset
Source:
Returns:
true if rName is loaded in ResourceMap
Type
Boolean

(static) MapEntry(rName) → {MapEntry}

ResourceMap node containing name and refrence count of resource
Parameters:
Name Type Description
rName String
Source:
Returns:
Type
MapEntry

(static) MapEntry(rName) → {MapEntry}

ResourceMap node containing name and refrence count of resource
Parameters:
Name Type Description
rName String
Source:
Returns:
Type
MapEntry

(static) retrieveAsset(rName) → {File}

Return the asset of rName
Parameters:
Name Type Description
rName String name of asset to return
Source:
Returns:
asset associtated to rName
Type
File

(static) retrieveAsset(rName) → {File}

Return the asset of rName
Parameters:
Name Type Description
rName String name of asset to return
Source:
Returns:
asset associtated to rName
Type
File

(static) setLoadCompleteCallback(funct) → {void}

Make sure to set the callback _AFTER_ all load commands are issued
Parameters:
Name Type Description
funct function callback Function
Source:
Returns:
Type
void

(static) setLoadCompleteCallback(funct) → {void}

Make sure to set the callback _AFTER_ all load commands are issued
Parameters:
Name Type Description
funct function callback Function
Source:
Returns:
Type
void

(static) unloadAsset(rName) → {Number}

Remove the reference to allow associated memory

be available for subsequent garbage collection

Parameters:
Name Type Description
rName String name of asset to unload
Source:
Returns:
Refrence count of asset
Type
Number

(static) unloadAsset(rName) → {Number}

Remove the reference to allow associated memory

be available for subsequent garbage collection

Parameters:
Name Type Description
rName String name of asset to unload
Source:
Returns:
Refrence count of asset
Type
Number