remove unnecessary code

This commit is contained in:
Rokas Puzonas 2023-08-15 00:08:59 +03:00
parent 842db1db65
commit 97396e87f6
2 changed files with 1 additions and 28 deletions

View File

@ -102,15 +102,8 @@ void UpdateDrawFrame() {
float dt = GetFrameTime();
RPROF_START("Update");
#ifdef PLATFORM_WEB
// If user goes to another tab and comes back, the time that the user was gone needs to be ignored.
// So boids wouldn't tunnel through walls and do other shenanigans.
if (dt <= 5*TIME_PER_FRAME) {
// TODO: Account for large 'dt' whenever a user switches to another tab and comes back in web
world_update(&g_app.world, dt);
}
#else
world_update(&g_app.world, dt);
#endif
visuals_update(&g_app.world, &g_app.visuals);
RPROF_STOP();

View File

@ -38,26 +38,6 @@
background-color: black;
}
</style>
<script type='text/javascript' src="https://cdn.jsdelivr.net/gh/eligrey/FileSaver.js/dist/FileSaver.min.js">
</script>
<script type='text/javascript'>
function saveFileFromMEMFSToDisk(memoryFSname, localFSname) // This can be called by C/C++ code
{
var isSafari = false; // Not supported, navigator.userAgent access is being restricted
//var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
var data = FS.readFile(memoryFSname);
var blob;
if (isSafari) blob = new Blob([data.buffer], { type: "application/octet-stream" });
else blob = new Blob([data.buffer], { type: "application/octet-binary" });
// NOTE: SaveAsDialog is a browser setting. For example, in Google Chrome,
// in Settings/Advanced/Downloads section you have a setting:
// 'Ask where to save each file before downloading' - which you can set true/false.
// If you enable this setting it would always ask you and bring the SaveAsDialog
saveAs(blob, localFSname);
}
</script>
</head>
<body>
<canvas class=emscripten id=canvas oncontextmenu=event.preventDefault() tabindex=-1></canvas>