Skip to content

Commit

Permalink
aframevr#5364 : Sound : Added API for reaching THREE.Audio.loopStart(…
Browse files Browse the repository at this point in the history
…) and loopEnd()
  • Loading branch information
JonathannJacobs committed Oct 18, 2023
1 parent bf3e196 commit f91140a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/components/sound.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module.exports.Component = registerComponent('sound', {
autoplay: {default: false},
distanceModel: {default: 'inverse', oneOf: ['linear', 'inverse', 'exponential']},
loop: {default: false},
loopStart: {default: 0},
loopEnd: {default: 0},
maxDistance: {default: 10000},
on: {default: ''},
poolSize: {default: 1},
Expand Down Expand Up @@ -59,6 +61,8 @@ module.exports.Component = registerComponent('sound', {
sound.setRolloffFactor(data.rolloffFactor);
}
sound.setLoop(data.loop);
sound.setLoopStart(data.loopStart);
sound.setLoopEnd(data.loopEnd);
sound.setVolume(data.volume);
sound.isPaused = false;
}
Expand Down

0 comments on commit f91140a

Please sign in to comment.