June 2021
Intermediate to advanced
304 pages
7h 49m
English
In this chapter, we’ll examine what linear memory is, how to use it to share data between JavaScript and WebAssembly code, and how to create it from within JavaScript. We’ll also update linear memory from WebAssembly and then use those updates from within the JavaScript code.
One common task in computer games is collision detection, detecting and appropriately reacting to two objects touching. The number of computations required grows exponentially as you add objects. Collision detection is a great candidate for building in WebAssembly. In this chapter, we’ll create a list of circles defined randomly in the JavaScript, and ...
Read now
Unlock full access