INNER CODE UNIT · JavaScript
init
electronicarts/pbmpm · src/main.js:26
function init()
{
// Build list of insert handlers.
// An insert handler is just a KVP that can substitute a //!insert directive
// in a wgsl shader.
let insertHandlers = {};
// Setup the UI sidebar
ui.init(() => {g_reset = true;}, () => {g_pause = !g_pause;});
loadScenes()
// Setup sim.
// Sim will add to the list of insert handlers.
sim.init(insertHandlers);
// Setup rendering.
// Rendering will add to the list of insert handlers.