16 #include <emscripten.h> 17 #include "../tools/string_utils.h" 20 extern void EMP_Initialize();
27 static bool init =
false;
36 static bool init =
false;
40 window.requestAnimFrame = (
function(callback) {
41 return window.requestAnimationFrame
42 || window.webkitRequestAnimationFrame
43 || window.mozRequestAnimationFrame
44 || window.oRequestAnimationFrame
45 || window.msRequestAnimationFrame
46 ||
function(callback) { window.setTimeout(callback, 1000 / 60); };
59 template <
typename VAR_TYPE>
60 std::function<std::string()> Live_impl(VAR_TYPE & var,
bool) {
65 template <
typename IN_TYPE>
66 std::function<std::string()> Live_impl(IN_TYPE && fun,
int) {
73 std::function<std::string()> Live(T && val) {
74 return Live_impl(std::forward<T>(val),
true);
86 #define EM_ASM_ARGS(...) 87 #define EM_ASM_INT(...) 0 88 #define EM_ASM_DOUBLE(...) 0.0 89 #define EM_ASM_INT_V(...) 0 90 #define EM_ASM_DOUBLE_V(...) 0.0 std::string to_string(ALL_TYPES &&...all_values)
Definition: string_utils.h:511
static bool Initialize()
Stub for when Emscripten is not in use.
Definition: init.h:98
std::ofstream debug_file("debug_file")
static bool InitializeAnim()
Stub for when Emscripten is not in use.
Definition: init.h:104
If we are in emscripten, make sure to include the header.
Definition: array.h:37