From a239a268439a1c308819460bcab42787b4787018 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 2 Sep 2018 15:09:22 +0200 Subject: [PATCH] hyperweb: fixed the rotmatrix parameter order, also disabled is CAP_ORIENTATION disabled --- hyperweb.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hyperweb.cpp b/hyperweb.cpp index 968805ea..fd270e67 100644 --- a/hyperweb.cpp +++ b/hyperweb.cpp @@ -145,16 +145,18 @@ void initweb() { if(showstartmenu) pushScreen(showDemo); } +#if CAP_ORIENTATION transmatrix getOrientation() { ld alpha, beta, gamma; alpha = EM_ASM_DOUBLE({ return rotation_alpha; }); beta = EM_ASM_DOUBLE({ return rotation_beta; }); gamma = EM_ASM_DOUBLE({ return rotation_gamma; }); return - rotmatrix(0, 1, alpha * M_PI / 180) * - rotmatrix(1, 2, beta * M_PI / 180) * - rotmatrix(0, 2, gamma * M_PI / 180); + rotmatrix(alpha * M_PI / 180, 0, 1) * + rotmatrix(beta * M_PI / 180, 1, 2) * + rotmatrix(gamma * M_PI / 180, 0, 2); } +#endif void emscripten_get_commandline() { #ifdef EMSCRIPTEN_FIXED_ARG