AudioComponentData interface
Data for the AudioComponent, see ComponentManager.create() on how to create a component
Signature:
export interface AudioComponentData extends Component3DData
Extends: Component3DData
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
boolean |
(Optional) weather the audio is used to play a background music. Defaults to false | ||
false |
Whether the audio should start playing automatically. Defaults to false | ||
string |
(Optional) if not provided, an auto id will be generated | ||
false |
Whether the audio should loop. Defaults to false | ||
string |
(Optional) name for the component. Defaults to "" | ||
number |
(Optional) audio playback rate. Defaults to 1 | ||
(Optional) Position of the audio in the space. Defaults to {x: 0, y: 0, z: 0} | |||
(Optional) Rotation of the audio in the space. Defaults to {x: 0, y: 0, z: 0} | |||
(Optional) Scale of the audio in the space. Defaults to {x: 1, y: 1, z: 1} | |||
"audio" |
Type of the component | ||
string |
url of the audio file | ||
number |
(Optional) Volume of the audio, from 0 to 1. Defaults to 1 |