This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # include <Siv3D.hpp> // OpenSiv3D v0.4.3 | |
| # include <emscripten.h> | |
| // 猫の座標 | |
| Vec2 catPos(640, 450); | |
| void MainLoop() | |
| { | |
| if (!s3d::System::Update()) { | |
| emscripten_cancel_main_loop(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mergeInto(LibraryManager.library, { | |
| glfwGetKeysSiv3D: function (windowid) { | |
| var window = GLFW.WindowFromId(windowid); | |
| if (!window) return 0; | |
| if (!window.keysBuffer) { | |
| window.keysBuffer = Module._malloc(349 /* GLFW_KEY_LAST + 1 */) | |
| } | |
| Module.HEAPU8.set(window.keys, window.keysBuffer); | |
| return window.keysBuffer; | |
| }, |
NewerOlder