From 9a156ec8984fb9b76486e115e7baa16a7ec4e40d Mon Sep 17 00:00:00 2001 From: Pavle Goloskokovic Date: Thu, 30 Nov 2017 18:55:21 +0100 Subject: [PATCH] Adding marker for each key in spritemap object --- v3/src/sound/webaudio/WebAudioSpriteSound.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/v3/src/sound/webaudio/WebAudioSpriteSound.js b/v3/src/sound/webaudio/WebAudioSpriteSound.js index ae7422c58..d0db7cb49 100644 --- a/v3/src/sound/webaudio/WebAudioSpriteSound.js +++ b/v3/src/sound/webaudio/WebAudioSpriteSound.js @@ -11,6 +11,14 @@ var WebAudioSpriteSound = new Class({ * @property {object} spritemap */ this.spritemap = manager.game.cache.json.get(key).spritemap; + for (var markerName in this.spritemap) { + this.addMarker({ + name: markerName, + start: this.spritemap[markerName].start, + duration: this.spritemap[markerName].end - this.spritemap[markerName].start, + config: config + }); + } } }); module.exports = WebAudioSpriteSound;