openspace.asset

Functions overview

Name

Documentation

add

Adds an asset to the current scene

allAssets

Returns the paths to all loaded assets, loaded directly or indirectly, as a table containing the paths to all loaded assets

isLoaded

Returns true if the referenced asset already has been loaded

remove

Removes the asset with the specfied name from the scene

removeAll

Removes all assets that are currently loaded

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

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.

Parameters
  • assetName String

Return type: void

Signature
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[]

Signature
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.

Parameters
  • assetName String

Return type: Boolean

Signature
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.

Parameters
  • assetName String

Return type: void

Signature
openspace.asset.remove(assetName)

removeAll

Removes all assets that are currently loaded

Return type: void

Signature
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[]

Signature
openspace.asset.rootAssets()