Skip to content

Commit 7d717a9

Browse files
committed
warn of dragons
1 parent 6d98d6b commit 7d717a9

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

CHANGELOG.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
11
See https://github.com/Birch-san/box2d-wasm/releases
22

3+
# v6.0.2
4+
5+
[Fixed](https://github.com/Birch-san/box2d-wasm/commit/b7dab1d61d96cb28e268e2923dfb916211aa6432#diff-885c90134a4da6981f7c2fb931312d27389c9c0695d79fb5d4cbc7593cdcc2ff) substantial performance & size [regression](https://github.com/Birch-san/box2d-wasm/commit/6ec863d23d28bc8aced657d4d3280a66e656d07f#diff-885c90134a4da6981f7c2fb931312d27389c9c0695d79fb5d4cbc7593cdcc2ffR34) introduced in [`v5.0.0`](https://github.com/Birch-san/box2d-wasm/releases/tag/v5.0.0). We now correctly set optimization level.
6+
7+
Box2D.js is still 319kB.
8+
Box2D.simd.js is still 319kB.
9+
Box2D.wasm is 161kB (down from 226kB).
10+
Box2D.simd.wasm is 162kB (down from 226kB).
11+
12+
Performance is back to normal now, so it's now possible to try out SIMD properly.
13+
314
# v6.0.1
415

16+
**Do not use: suffers from performance/size regression introduced in [`v5.0.0`](https://github.com/Birch-san/box2d-wasm/releases/tag/v5.0.0). Prefer [`v6.0.2`](https://github.com/Birch-san/box2d-wasm/releases/tag/v6.0.2)**
17+
518
Added a mechanism to the 'browser global' loader in the UMD entrypoint that enables you to specify the directory from which you serve Box2D.js, via the `data-box2d-dir` attribute on its `<script>` tag:
619

720
```html
@@ -12,6 +25,8 @@ This tells `entry.js` that `Box2D.js` can be found at `Box2D/Box2D.js`.
1225

1326
# v6.0.0
1427

28+
**Do not use: suffers from performance/size regression introduced in [`v5.0.0`](https://github.com/Birch-san/box2d-wasm/releases/tag/v5.0.0). Prefer [`v6.0.2`](https://github.com/Birch-san/box2d-wasm/releases/tag/v6.0.2)**
29+
1530
Simplified (i.e. flattened) directory structure introduced in v5.0.0, to make it easier to import the library and serve deferred assets.
1631

1732
Inlined SIMD feature detection, eliminating dependency on `wasm-feature-detect`. This simplifies the entrypoints (fewer files to locate and load in).
@@ -51,6 +66,10 @@ requirejs(['./entry.js'], function (Box2DFactory) {
5166

5267
# v5.0.3
5368

69+
**Do not use: suffers from performance/size regression introduced in [`v5.0.0`](https://github.com/Birch-san/box2d-wasm/releases/tag/v5.0.0). Prefer [`v6.0.2`](https://github.com/Birch-san/box2d-wasm/releases/tag/v6.0.2)**
70+
71+
**Additionally: UMD release appears to be broken** (was built using a text-replace trick which doesn't work in newer Emscripten)
72+
5473
Updated from Emscripten `2.0.17`->`2.0.26`.
5574

5675
Box2D.js is still 319kB.
@@ -61,16 +80,18 @@ The most dramatic change in [the changelog](https://github.com/emscripten-core/e
6180

6281
Emscripten 2.0.21 introduces some hints that will help your bundler locate the `.wasm` asset (and obviate the need to implement `locateFile`). Will try to determine whether there's any instructions that can be simplified as a result of this.
6382

64-
**note: UMD release appears to be broken** (was built using a text-replace trick which doesn't work in newer Emscripten)
65-
6683
# v5.0.2
6784

85+
**Do not use: suffers from performance/size regression introduced in [`v5.0.0`](https://github.com/Birch-san/box2d-wasm/releases/tag/v5.0.0). Prefer [`v6.0.2`](https://github.com/Birch-san/box2d-wasm/releases/tag/v6.0.2)**
86+
6887
The ES module entrypoint `es/entry.js` introduced in v5.0.0 relied on [NodeJS-style import resolution](https://nodejs.org/api/esm.html#esm_customizing_esm_specifier_resolution_algorithm) of the library `wasm-feature-detect`. This worked in environments where a bundler is available, but not on the Web. An additional entrypoint, `es-explicit/entry.js` is provided to support ES imports on the Web.
6988

7089
The ["modern" demo](https://github.com/Birch-san/box2d-wasm/tree/v5.0.3/demo/modern) demonstrates a working configuration of SIMD, and a simpler configuration without SIMD.
7190

7291
# v5.0.1
7392

93+
**Do not use: suffers from performance/size regression introduced in [`v5.0.0`](https://github.com/Birch-san/box2d-wasm/releases/tag/v5.0.0). Prefer [`v6.0.2`](https://github.com/Birch-san/box2d-wasm/releases/tag/v6.0.2)**
94+
7495
The UMD module distribution in v5.0.0 was a misnomer — it was actually only ever a CJS module.
7596

7697
5.0.1 introduces a real UMD module, which has been confirmed working in NodeJS and on the Web. It includes an attempt at AMD support, but this is untested.
@@ -82,6 +103,8 @@ The ["classic" demo](https://github.com/Birch-san/box2d-wasm/tree/v5.0.3/demo/cl
82103

83104
# v5.0.0
84105

106+
**Do not use: introduces performance/size regression. Prefer [`v6.0.2`](https://github.com/Birch-san/box2d-wasm/releases/tag/v6.0.2)**
107+
85108
Added support for [WebAssembly SIMD acceleration](https://v8.dev/features/simd) (in supported browsers). This can make specific parts of the code 4x faster (but performance overall is unlikely to be dramatically different).
86109

87110
package.json now specifies the entrypoint to the library as `entry.js` (rather than pointing directly to `Box2D.js`). `entry.js` uses [`wasm-feature-detect`](wasm-feature-detect) to determine whether SIMD is available on your platform. It will then load in either `Box2D.js` or `Box2D.simd.js` as appropriate (after which, said .js file will load in `Box2D.wasm` or `Box2D.simd.wasm` respectively).

0 commit comments

Comments
 (0)