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

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.

主站蜘蛛池模板: 建昌县| 三都| 积石山| 大关县| 嘉鱼县| 深州市| 来宾市| 建德市| 汉中市| 东丰县| 夹江县| 靖江市| 年辖:市辖区| 襄汾县| 诸城市| 宕昌县| 靖宇县| 太白县| 东城区| 乌兰县| 巧家县| 南岸区| 肇庆市| 金沙县| 新干县| 德兴市| 兰溪市| 台东市| 永年县| 铜陵市| 辽源市| 琼中| 阜新| 泽库县| 灌阳县| 汝州市| 饶阳县| 景洪市| 衡南县| 台东县| 镇江市|