mirror of
https://github.com/sehugg/8bitworkshop.git
synced 2025-02-19 07:30:55 +00:00
better error reporting in timer callback; .htaccess for redir.html cache
This commit is contained in:
parent
6063b6598b
commit
0ade973ad7
9
.htaccess
Normal file
9
.htaccess
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<FilesMatch "redir\.(html|htm)$">
|
||||||
|
FileETag None
|
||||||
|
<ifModule mod_headers.c>
|
||||||
|
Header unset ETag
|
||||||
|
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
|
||||||
|
Header set Pragma "no-cache"
|
||||||
|
Header set Expires "Wed, 11 Jan 1984 05:00:00 GMT"
|
||||||
|
</ifModule>
|
||||||
|
</FilesMatch>
|
@ -4,15 +4,9 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
|
|
||||||
<meta http-equiv="Pragma" content="no-cache" />
|
|
||||||
<meta http-equiv="Expires" content="0" />
|
|
||||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
|
||||||
<title>8bitworkshop</title>
|
<title>8bitworkshop</title>
|
||||||
|
|
||||||
<!-- Bootstrap -->
|
<!-- Bootstrap -->
|
||||||
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
|
||||||
|
|
||||||
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
|
||||||
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
|
||||||
<!--[if lt IE 9]>
|
<!--[if lt IE 9]>
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
grep "var VERSION" redir.html
|
grep "var VERSION" redir.html
|
||||||
mkdir -p .tmp
|
mkdir -p .tmp
|
||||||
cp demo.html .tmp/index.html
|
cp demo.html .tmp/index.html
|
||||||
rsync -rpilv --chmod=a+rx -e "ssh -p 2222" .tmp/index.html redir.html privacy.html css bootstrap images $RSYNC_PATH/
|
rsync -rpilv --chmod=a+rx -e "ssh -p 2222" .tmp/index.html .htaccess redir.html privacy.html css bootstrap images $RSYNC_PATH/
|
||||||
rm -fr .tmp
|
rm -fr .tmp
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
17
src/emu.ts
17
src/emu.ts
@ -196,25 +196,20 @@ export var AnimationTimer = function(frequencyHz:number, callback:() => void) {
|
|||||||
} else {
|
} else {
|
||||||
lastts = ts + intervalMsec; // frames skipped, catch up
|
lastts = ts + intervalMsec; // frames skipped, catch up
|
||||||
}
|
}
|
||||||
if (running) {
|
|
||||||
scheduleFrame(lastts - ts);
|
|
||||||
} else {
|
|
||||||
pulsing = false;
|
|
||||||
}
|
|
||||||
if (!useReqAnimFrame || lastts - ts > intervalMsec/2) {
|
if (!useReqAnimFrame || lastts - ts > intervalMsec/2) {
|
||||||
if (running) {
|
if (running) {
|
||||||
try {
|
callback();
|
||||||
callback();
|
|
||||||
} catch (e) {
|
|
||||||
running = false;
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (nframes == 0) startts = ts;
|
if (nframes == 0) startts = ts;
|
||||||
if (nframes++ == 300) {
|
if (nframes++ == 300) {
|
||||||
console.log("Avg framerate: " + nframes*1000/(ts-startts) + " fps");
|
console.log("Avg framerate: " + nframes*1000/(ts-startts) + " fps");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (running) {
|
||||||
|
scheduleFrame(lastts - ts);
|
||||||
|
} else {
|
||||||
|
pulsing = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.isRunning = function() {
|
this.isRunning = function() {
|
||||||
return running;
|
return running;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user