3D TETRIS implementation in C++ (for Emscripten)