kopia lustrzana https://github.com/backface/turtlestitch
fixed a glitch in the service worker
rodzic
c0dea85dfb
commit
e5899a518d
16
snap.html
16
snap.html
|
@ -37,9 +37,9 @@
|
||||||
<script src="src/sha512.js?version=2019-06-27"></script>
|
<script src="src/sha512.js?version=2019-06-27"></script>
|
||||||
<script src="src/FileSaver.min.js?version=2019-06-27"></script>
|
<script src="src/FileSaver.min.js?version=2019-06-27"></script>
|
||||||
<script>
|
<script>
|
||||||
var world;
|
var world,
|
||||||
// FPS = 67,
|
FPS = 67,
|
||||||
// lastTime = 0;
|
lastTime = 0;
|
||||||
window.onload = function () {
|
window.onload = function () {
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
navigator.serviceWorker.register('sw.js');
|
navigator.serviceWorker.register('sw.js');
|
||||||
|
@ -48,13 +48,13 @@
|
||||||
new IDE_Morph().openIn(world);
|
new IDE_Morph().openIn(world);
|
||||||
loop();
|
loop();
|
||||||
};
|
};
|
||||||
function loop() { // timestamp) {
|
function loop(timestamp) {
|
||||||
requestAnimationFrame(loop);
|
requestAnimationFrame(loop);
|
||||||
// if (timestamp - lastTime < 1000 / FPS) {
|
if (timestamp - lastTime < 1000 / FPS) {
|
||||||
// return;
|
return;
|
||||||
// }
|
}
|
||||||
world.doOneCycle();
|
world.doOneCycle();
|
||||||
// lastTime = timestamp;
|
lastTime = timestamp;
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
|
|
2
sw.js
2
sw.js
|
@ -100,7 +100,7 @@ var snapVersion = '8.0.0-rc-220724',
|
||||||
'libraries/localstorage_module.xml',
|
'libraries/localstorage_module.xml',
|
||||||
'libraries/make-variables.xml',
|
'libraries/make-variables.xml',
|
||||||
'libraries/maps_module.xml',
|
'libraries/maps_module.xml',
|
||||||
'libraries/menu_module',
|
'libraries/menu_module.xml',
|
||||||
'libraries/mqttExtension.js',
|
'libraries/mqttExtension.js',
|
||||||
'libraries/mqtt.js',
|
'libraries/mqtt.js',
|
||||||
'libraries/mqtt.xml',
|
'libraries/mqtt.xml',
|
||||||
|
|
Ładowanie…
Reference in New Issue