wasm-bindgen/examples/webxr/webxr.js
Thomas Etter 2ccdbd9337
Upgrade the webpack-based examples' npm dependencies (move to webpack 5) (#2651)
* Upgraded the webpack examples' npm dependencies which (among other things) upgrades them to webpack 5

For the weather_report, had to choose the syncWebAssembly experiment,
whereas the rest works fine with asyncWebAssembly

* Fix the weather report example compilation by adding it to the main workspace.
This currently fails with:
error: current package believes it's in a workspace when it's not:
current:
<project-root>/examples/weather_report/Cargo.toml
workspace: <project-root>/Cargo.toml

* Fix the build of the webxr example with webpack 5

* run cargo fmt
2021-08-10 09:43:42 -05:00

8 lines
150 B
JavaScript

import * as wasm from "./pkg";
var xrApp = new wasm.XrApp();
xrApp.init()
.then(res => {
console.log(res);
xrApp.start();
});