Skip to main content

updateAssets

@combeenation/custom-code-utils


Variable: updateAssets()

const updateAssets: (assets, sdCtrlName?, queued) => Promise<SDUpdateQueueResult> = SdvScene.updateAssets

Adds or updates assets to the 3d scene.
Further information about the desired asset structure can be found in ShapeDiver docs.

Parameters

assets

SceneAsset[]

sdCtrlName?

string

If not configured, the first shapediver instance of the configurator is used

queued?

boolean = false

true: Assets will be updated after all currently pending asset updates are finished.
In this case the current asset update will not be aborted, which could otherwise lead to missing or erronous asset updates.
false: Assest will be updated in the next JS cycle, no matter if other asset updates are currently pending.
Asset updates which are triggered within the same JS cycle are accumulated and applied in one update.

Returns

Promise<SDUpdateQueueResult>