メインコンテンツまでスキップ

<pc-sound>

The <pc-sound> tag is used to define a sound.

注記
  • It must be a direct child of a <pc-sounds> component.

Attributes

属性 (Attribute)説明
assetA string that should match the id of a <pc-asset> tag that has a type of audio.
auto-playValueless attribute. If present, the sound slot plays automatically.
durationThe duration of the sound slot.
loopValueless attribute. If present, the sound slot loops.
nameThe name of the sound slot.
overlapValueless attribute. If present, the sound slot overlaps.
pitchThe pitch of the sound slot. If not specified, 1 is used.
start-timeThe start time of the sound slot. If not specified, 0 is used.
volumeThe volume of the sound slot. If not specified, 1 is used.

<pc-sounds>
<pc-sound asset="music"></pc-sound>
</pc-sounds>

JavaScript Interface

You can programmatically create and manipulate <pc-sound> elements using the SoundElement API.