projects
/
pwl6.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
62a230d
)
Reset audio offset every tick.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Thu, 2 Oct 2014 13:32:20 +0000
(15:32 +0200)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Thu, 2 Oct 2014 13:32:20 +0000
(15:32 +0200)
src/yuu/director.js
patch
|
blob
|
history
diff --git
a/src/yuu/director.js
b/src/yuu/director.js
index
cdba62c
..
7f90fd4
100644
(file)
--- 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) {
this._resized = true;
var director = this;
this._rafId = window.requestAnimationFrame(function _ (t) {
- if (!director._timerStart)
{
+ if (!director._timerStart)
director._timerStart = t;
director._timerStart = t;
- director._audioOffset = yuu.audio
- ? yuu.audio.currentTime * 1000 - t
- : 0;
- }
director._rafId = window.requestAnimationFrame(_);
director.render(t);
});
director._rafId = window.requestAnimationFrame(_);
director.render(t);
});
@@
-385,6
+381,10
@@
/** Tick and render all scenes, bottom to top */
var i;
/** 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;
if (this._resized) {
this._dispatchSceneInput("resize", [yuu.canvas]);
this._resized = false;