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

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.

主站蜘蛛池模板: 磐石市| 策勒县| 和静县| 洮南市| 新蔡县| 沈丘县| 宁夏| 房产| 宝清县| 城市| 遂川县| 油尖旺区| 广安市| 依兰县| 浦北县| 辽阳县| 万年县| 永寿县| 阿荣旗| 太保市| 莱州市| 西安市| 大同县| 绩溪县| 黄梅县| 米易县| 固安县| 松阳县| 平和县| 舒兰市| 镇安县| 子长县| 娄底市| 桃园市| 常宁市| 金门县| 玉龙| 镇康县| 翁源县| 中阳县| 昌乐县|