Skip to content

v6.0.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Birch-san Birch-san released this 08 Jul 16:06
· 37 commits to master since this release
2d565a1

Do not use: suffers from performance/size regression introduced in v5.0.0. Prefer v6.0.2

Simplified (i.e. flattened) directory structure introduced in v5.0.0, to make it easier to import the library and serve deferred assets.

Inlined SIMD feature detection, eliminating dependency on wasm-feature-detect. This simplifies the entrypoints (fewer files to locate and load in).

Eliminated "ES explicit" entrypoint (now that we are zero-dependency again, we no longer need to cater for differences in ES module resolution).

Simplified UMD entrypoint by writing bespoke loaders for each of CommonJS, AMD and Browser globals.

Tested AMD entrypoint and confirmed working. Can be used by serving a folder with the following assets:

entry.js
Box2D.js
Box2D.wasm
Box2D.simd.js
Box2D.simd.wasm
index.html
main.js
require.js
<!-- load RequireJS library, import main.js -->
<script data-main="main" src="require.js"></script>
// main.js
// import Box2D's umd/entry.js
requirejs(['./entry.js'], function (Box2DFactory) {
  (async () => {
    const box2D = await Box2DFactory();
    console.log(box2D);
  })();
});