X-Git-Url: https://git.yukkurigames.com/?p=yuu.git;a=blobdiff_plain;f=src%2Fyuu%2Fdirector.js;h=7f90fd4a30c6399415348e286dffa98fce7ca722;hp=e1c0b538b24230cd19e8a00a301d1e64d4ad0dad;hb=6bd81f79de7d4120ba8b4c4d0dc8c98689a00da8;hpb=6be6217d1fda27ec6c168466111cd26e52bf59a2 diff --git a/src/yuu/director.js b/src/yuu/director.js index e1c0b53..7f90fd4 100644 --- a/src/yuu/director.js +++ b/src/yuu/director.js @@ -304,12 +304,8 @@ this._resized = true; var director = this; this._rafId = window.requestAnimationFrame(function _ (t) { - if (!director._timerStart) { + if (!director._timerStart) director._timerStart = t; - director._audioOffset = yuu.audio - ? yuu.audio.currentTime * 1000 - t - : 0; - } director._rafId = window.requestAnimationFrame(_); director.render(t); }); @@ -373,7 +369,7 @@ yuu.downloadURL( yuu.canvas.toDataURL("image/png"), document.title + " (" + date + ").png"); - this.toast("\uf030", 0.5, "screenshot"); + this.toast("📷", 0.5, "screenshot"); } catch (exc) { var dialog = yuu.showError(exc); if (dialog) @@ -385,6 +381,10 @@ /** Tick and render all scenes, bottom to top */ var i; + this._audioOffset = yuu.audio + ? yuu.audio.currentTime * 1000 - t + : 0; + if (this._resized) { this._dispatchSceneInput("resize", [yuu.canvas]); this._resized = false; @@ -674,7 +674,7 @@ yuu.defaultKeybinds.bind("f11", "++fullscreen"); yuu.defaultKeybinds.bind("f12", "screenshot"); yuu.defaultKeybinds.bind( - "control+s", "++mute && toast \uf026 1 mute || toast \uf028 1 mute"); + "control+s", "++mute && toast 🔈 1 mute || toast 🔊 1 mute"); var director = yuu.director = new yuu.Director(); /** The standard director */