subtract warm up time instead of add

This commit is contained in:
Kevin Ngo
2018-10-23 16:54:01 -07:00
parent 61459fae1a
commit 2ea96f911e

View File

@@ -148,7 +148,7 @@ AFRAME.registerComponent('beat-loader', {
if (this.beatsTimeOffset !== undefined &&
this.songCurrentTime !== this.el.components.song.context.currentTime) {
this.songCurrentTime = this.el.components.song.context.currentTime;
this.beatsTime = (this.songCurrentTime + this.data.beatAnticipationTime) * 1000 +
this.beatsTime = (this.songCurrentTime + this.data.beatAnticipationTime) * 1000 -
BEAT_WARMUP_TIME;
}