Tweak interval
This commit is contained in:
parent
69ad74ed73
commit
6a78033764
1 changed files with 2 additions and 2 deletions
|
|
@ -18,13 +18,13 @@ export const enableContextLostSimulator = (canvas: HTMLCanvasElement) => {
|
||||||
ext.loseContext();
|
ext.loseContext();
|
||||||
console.info(formatLog('context-lost-simulator', 'lost'));
|
console.info(formatLog('context-lost-simulator', 'lost'));
|
||||||
|
|
||||||
const restoreTimeout = Math.random() * 500;
|
const restoreTimeout = Math.random() * 1500;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
ext.restoreContext();
|
ext.restoreContext();
|
||||||
console.info(formatLog('context-lost-simulator', 'restored'));
|
console.info(formatLog('context-lost-simulator', 'restored'));
|
||||||
}, restoreTimeout);
|
}, restoreTimeout);
|
||||||
|
|
||||||
setTimeout(() => simulateContextLost(), restoreTimeout + Math.random() * 500);
|
setTimeout(() => simulateContextLost(), restoreTimeout + Math.random() * 1500);
|
||||||
};
|
};
|
||||||
|
|
||||||
setTimeout(simulateContextLost, 1000);
|
setTimeout(simulateContextLost, 1000);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue