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 |
|
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)
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()