官术网_书友最值得收藏!

Summary

In this chapter, we learned how to get keyboard input for use with WebAssembly. There are two primary methods. We could either take in keyboard input on the JavaScript side and communicate with WebAssembly through a wrapper made with Module.cwrap, or by calling WebAssembly functions directly with Module.ccall. The other way to accept keyboard input in WebAssembly is by using SDL keyboard input events. When we use this method, we can use the default Emscripten shell. This second method, using SDL events, will be our preferred method throughout the rest of this book.

In the next chapter, we will learn more about the game loop and how we will use it in our game, as well as games in general.

主站蜘蛛池模板: 贵南县| 光山县| 淄博市| 师宗县| 闽清县| 昌平区| 达尔| 长宁县| 富川| 阿巴嘎旗| 宝应县| 自治县| 大宁县| 新平| 禄劝| 米泉市| 南皮县| 高要市| 新密市| 临沭县| 中阳县| 洛隆县| 六盘水市| 施秉县| 唐河县| 崇礼县| 黔东| 大埔县| 安化县| 宝山区| 阳泉市| 丹棱县| 阿巴嘎旗| 锦屏县| 长治县| 鹤峰县| 阿鲁科尔沁旗| 正蓝旗| 嵊泗县| 广东省| 永仁县|