removeVariations
Added in 6.5.0
Forget a variation name made with createVariations. The takes stay loaded and can still be played by their own ids.
removeVariations(id: string): void;
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
id | string | required | The variation name. |
Returns
Nothing.
Example
soundHub.createVariations('footstep', ['step1', 'step2', 'step3']);
soundHub.removeVariations('footstep');
soundHub.getVariations('footstep'); // undefined
soundHub.play('step2'); // the takes are still there
Good to know
- Takes that are playing keep playing. Stop them first with
stop('footstep')if they should not. - A name that is not a variation name is ignored.
- After this the name is free, so you can load a sound under it.
- To unload the takes as well, call
unloadSoundfor each of them.
See also
createVariations: make a variation name.getVariations: the takes behind a name.