fix: stage ticking
This commit is contained in:
parent
e81950e084
commit
f63e607396
|
@ -62,8 +62,13 @@ const Stage = ({
|
|||
return undefined;
|
||||
}
|
||||
let handle;
|
||||
const tick = (elapsed) => {
|
||||
ticker(elapsed);
|
||||
let last;
|
||||
const tick = (now) => {
|
||||
if (undefined === last) {
|
||||
last = now;
|
||||
}
|
||||
ticker((now - last) / 1000);
|
||||
last = now;
|
||||
renderer.render(renderable);
|
||||
handle = requestAnimationFrame(tick);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user