- Hands-On Game Development with WebAssembly
- Rick Battagline
- 123字
- 2021-06-24 13:41:09
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.
推薦閱讀
- 零點起飛學Xilinx FPG
- 電腦組裝與維修從入門到精通(第2版)
- 基于Proteus和Keil的C51程序設計項目教程(第2版):理論、仿真、實踐相融合
- BeagleBone By Example
- 電腦組裝、維護、維修全能一本通(全彩版)
- 硬件產品經理成長手記(全彩)
- scikit-learn:Machine Learning Simplified
- VCD、DVD原理與維修
- 基于PROTEUS的電路設計、仿真與制板
- 3D Printing Blueprints
- Intel FPGA權威設計指南:基于Quartus Prime Pro 19集成開發環境
- 嵌入式系統原理及應用:基于ARM Cortex-M4體系結構
- 微服務架構基礎(Spring Boot+Spring Cloud+Docker)
- 嵌入式系統設計大學教程(第2版)
- Zabbix 4 Network Monitoring