openspace.asset
Functions overview
Name |
Documentation |
|---|---|
Adds an asset to the current scene |
|
Returns the paths to all loaded assets, loaded directly or indirectly, as a table containing the paths to all loaded assets |
|
Returns true if the referenced asset already has been loaded |
|
Reloads the asset with the specified name |
|
Removes the asset with the specfied name from the scene |
|
Removes all assets that are currently loaded |
|
Returns the paths to all loaded root assets, which are assets that are loaded directly either through a profile or by calling the `openspace |
Functions
add
Adds an asset to the current scene. The parameter passed into this function is the path to the file that should be loaded.
assetName
String
Return type: void
openspace.asset.add(assetName)
allAssets
Returns the paths to all loaded assets, loaded directly or indirectly, as a table containing the paths to all loaded assets.
Return type: Path[]
openspace.asset.allAssets()
isLoaded
Returns true if the referenced asset already has been loaded. Otherwise false is returned. The parameter to this function is the path of the asset that should be tested.
assetName
String
Return type: Boolean
openspace.asset.isLoaded(assetName)
reload
Reloads the asset with the specified name. If the asset was previously loaded explicity it will be removed and then re-added. If the asset was not previously loaded, it will only be loaded instead.
assetName
String
Return type: void
openspace.asset.reload(assetName)
remove
Removes the asset with the specfied name from the scene. The parameter to this function is the same that was originally used to load this asset, i.e. the path to the asset file.
assetName
String
Return type: void
openspace.asset.remove(assetName)
removeAll
Removes all assets that are currently loaded
Return type: void
openspace.asset.removeAll()
rootAssets
Returns the paths to all loaded root assets, which are assets that are loaded directly either through a profile or by calling the openspace.asset.add method.
Return type: Path[]
openspace.asset.rootAssets()