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

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.

主站蜘蛛池模板: 绥棱县| 陆川县| 台前县| 青川县| 信宜市| 化德县| 吴桥县| 咸阳市| 大冶市| 呼伦贝尔市| 沁水县| 平利县| 洞口县| 吉木萨尔县| 施秉县| 延长县| 太仆寺旗| 井陉县| 扎赉特旗| 安顺市| 长沙县| 平谷区| 抚州市| 济阳县| 镇安县| 探索| 临漳县| 余姚市| 苏尼特左旗| 太保市| 潮安县| 麻栗坡县| 无棣县| 谷城县| 静宁县| 灌阳县| 筠连县| 儋州市| 库尔勒市| 佛教| 小金县|