The advanced particle system we are writing has two external functions that can be called from the JavaScript in our app. These functions, add_emitter, and update_emitter, are called to either insert or modify the particle system in the WebAssembly module. The advanced_particle.cpp file contains these functions, as well as the main function, which is called when the Module is loaded, and the show_emission function, which is called once per frame render. We will not need to modify the main and the show_emission functions from what we created for the basic particle system earlier in this chapter. We will, however, need to add the additional parameters we put into our JavaScript code to add_emitter and update_emitter. Also, we have created a utility function called get_random_float, which we use when spawning particles. Because this file contains all of our other...
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand