- Hands-On Game Development with WebAssembly
- Rick Battagline
- 391字
- 2021-06-24 13:41:02
HTML5 and WebAssembly
In this chapter, we will show you how the C code we write to target WebAssembly comes together with HTML5, JavaScript, and CSS to create a web page. We will teach you how to create a new HTML shell file to be used by Emscripten in the creation of our WebAssembly app. We will discuss the Module object and how Emscripten uses it as an interface between our JavaScript and the WebAssembly module. We will show you how to call WebAssembly functions written in C from within JavaScript on our HTML page. We will also show you how to call JavaScript functions from our C code. We will discuss how to use CSS to improve the look of our web page. We will introduce you to the HTML5 Canvas element and show how it is possible to display images to the canvas from within JavaScript. We will briefly discuss moving those images around the canvas from our WebAssembly module. This chapter will give you an understanding of how everything works together and lays the foundation for other features we are developing for our WebAssembly applications.
In this chapter, we will cover the following topics:
- The Emscripten minimal shell file
- Creating a new HTML shell and C file
- Defining our CSS
- HTML5 and game development
- Adding a canvas to the Emscripten template
- Intel FPGA/CPLD設(shè)計(jì)(基礎(chǔ)篇)
- Deep Learning with PyTorch
- 現(xiàn)代辦公設(shè)備使用與維護(hù)
- Unity 5.x Game Development Blueprints
- 數(shù)字邏輯(第3版)
- micro:bit魔法修煉之Mpython初體驗(yàn)
- 電腦維護(hù)365問(wèn)
- Learning Game Physics with Bullet Physics and OpenGL
- 計(jì)算機(jī)組裝與維修技術(shù)
- Machine Learning with Go Quick Start Guide
- 微型計(jì)算機(jī)系統(tǒng)原理及應(yīng)用:國(guó)產(chǎn)龍芯處理器的軟件和硬件集成(基礎(chǔ)篇)
- 超大流量分布式系統(tǒng)架構(gòu)解決方案:人人都是架構(gòu)師2.0
- Neural Network Programming with Java(Second Edition)
- LPC1100系列處理器原理及應(yīng)用
- 數(shù)字媒體專(zhuān)業(yè)英語(yǔ)(第2版)