Birch-san / box2d-wasm

Box2D physics engine compiled to WebAssembly. Supports TypeScript and ES modules.
263 stars 21 forks source link

To load wasm #71

Closed lithegreat closed 6 months ago

lithegreat commented 6 months ago

I want to know how your demo loads 'box2d.wasm' because I noticed that the entry.js in the demo loads 'box2d.js' directly and does not directly load the wasm file. Perhaps it's loading the wasm through the JavaScript or it's not loading the wasm file at all? If it's the latter, how can I load the wasm file?

const asset = hasSIMD
  ? './Box2D.simd.js'
  : './Box2D.js';