This example has fallen out of date, I tried to resurrect it but it turned out to be non-trivial, given the special nature of emscripten's generated JavaScript wrappers. It might be better to provide an example that uses rollup, since that's the bundler that model-viewer uses, or a simple TypeScript example. For now, I think our simple HTML + raw JS samples are sufficient.