generated from rpuzonas/raylib-cpp-template
remove unnecessary code
This commit is contained in:
parent
842db1db65
commit
97396e87f6
@ -102,15 +102,8 @@ void UpdateDrawFrame() {
|
|||||||
float dt = GetFrameTime();
|
float dt = GetFrameTime();
|
||||||
|
|
||||||
RPROF_START("Update");
|
RPROF_START("Update");
|
||||||
#ifdef PLATFORM_WEB
|
// TODO: Account for large 'dt' whenever a user switches to another tab and comes back in 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) {
|
|
||||||
world_update(&g_app.world, dt);
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
world_update(&g_app.world, dt);
|
world_update(&g_app.world, dt);
|
||||||
#endif
|
|
||||||
visuals_update(&g_app.world, &g_app.visuals);
|
visuals_update(&g_app.world, &g_app.visuals);
|
||||||
RPROF_STOP();
|
RPROF_STOP();
|
||||||
|
|
||||||
|
@ -38,26 +38,6 @@
|
|||||||
background-color: black;
|
background-color: black;
|
||||||
}
|
}
|
||||||
</style>
|
</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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<canvas class=emscripten id=canvas oncontextmenu=event.preventDefault() tabindex=-1></canvas>
|
<canvas class=emscripten id=canvas oncontextmenu=event.preventDefault() tabindex=-1></canvas>
|
||||||
|
Loading…
Reference in New Issue
Block a user