Skip to content

Commit d0a54d5

Browse files
committed
tidy away
1 parent e5e328b commit d0a54d5

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

README.comparison-with-box2d-js.md

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Comparison with `box2d.js`
2+
3+
Compared to the existing [`box2d.js`](https://github.com/kripken/box2d.js/) package: `box2d-wasm` aims to support Box2D v2.4.0+ and TypeScript.
4+
5+
The most important user-facing differences are:
6+
7+
| Criteria | [`box2d.js`](https://github.com/kripken/box2d.js) | [`box2d-wasm`](https://github.com/Birch-san/box2d-wasm)
8+
| --- | --- | --- |
9+
| [Box2D](https://github.com/erincatto/box2d) version compatibility | v2.3.1 | v2.4.1 (latest) |
10+
| TypeScript declarations | No | Yes |
11+
| Distributes UMD module | Yes | Yes |
12+
| Distributes ES module | No | Yes |
13+
| Distributes WebAssembly | Yes | Yes |
14+
| Distributes asm.js | Yes | No |
15+
| JS+WASM Size, kB | 467 | 537 |
16+
| JS+WASM Size, kB (.gz) | 111 | 121 |
17+
18+
_Summary: I dropped older practices (asm.js) and adopted newer practices (ES modules, TypeScript)._
19+
20+
`box2d-wasm` is 9% bigger (but exports more+newer functionality).
21+
The performance is likely to be identical (they're compiled with moreorless the same Emscripten flags).
22+
23+
The featureset is similar; `box2d-wasm` exports Box2D functionality via the same WebIDL bindings `box2d.js` used, but adds some updates for Box2D v2.4.1.
24+
`box2d-wasm` additionally exposes some array properties and collision functions.
25+
26+
The invocation is similar; functionality is bound in the same way, so existing `box2d.js` examples and documentation should be broadly compatible with `box2d-wasm` (except for API differences specific to Box2D v2.4.1).
27+
28+
`box2d-wasm` provides a small number of [helper functions](box2d-wasm/Box2DModuleAugmentations.d.ts) for working with Emscripten types.
29+
30+
## Development differences
31+
32+
As for _how it's developed_, the differences from `box2d.js` are:
33+
34+
- Different build system, to support the newer cmake build system introduced in Box2D v2.4.0.
35+
- Different approach to version controlling source code and build output
36+
37+
More detail at [`README.project-aims.md`](README.project-aims.md).

README.md

+3-34
Original file line numberDiff line numberDiff line change
@@ -20,43 +20,12 @@ Then check out the [documentation](docs).
2020
Links against MIT-licensed code from Erin Catto's [Box2D](https://github.com/erincatto/box2d).
2121
Compiles Zlib-licensed code from Alon Zakai's [`box2d.js`](https://github.com/kripken/box2d.js).
2222

23-
## Project aims
23+
## Project
2424

2525
Compared to the existing [`box2d.js`](https://github.com/kripken/box2d.js/) package: `box2d-wasm` aims to support Box2D v2.4.0+ and TypeScript.
2626

27-
The most important user-facing differences are:
28-
29-
| Criteria | [`box2d.js`](https://github.com/kripken/box2d.js) | [`box2d-wasm`](https://github.com/Birch-san/box2d-wasm)
30-
| --- | --- | --- |
31-
| [Box2D](https://github.com/erincatto/box2d) version compatibility | v2.3.1 | v2.4.1 (latest) |
32-
| TypeScript declarations | No | Yes |
33-
| Distributes UMD module | Yes | Yes |
34-
| Distributes ES module | No | Yes |
35-
| Distributes WebAssembly | Yes | Yes |
36-
| Distributes asm.js | Yes | No |
37-
| JS+WASM Size, kB | 467 | 537 |
38-
| JS+WASM Size, kB (.gz) | 111 | 121 |
39-
40-
_Summary: I dropped older practices (asm.js) and adopted newer practices (ES modules, TypeScript)._
41-
42-
`box2d-wasm` is 9% bigger (but exports more+newer functionality).
43-
The performance is likely to be identical (they're compiled with moreorless the same Emscripten flags).
44-
45-
The featureset is similar; `box2d-wasm` exports Box2D functionality via the same WebIDL bindings `box2d.js` used, but adds some updates for Box2D v2.4.1.
46-
`box2d-wasm` additionally exposes some array properties and collision functions.
47-
48-
The invocation is similar; functionality is bound in the same way, so existing `box2d.js` examples and documentation should be broadly compatible with `box2d-wasm` (except for API differences specific to Box2D v2.4.1).
49-
50-
`box2d-wasm` provides a small number of [helper functions](box2d-wasm/Box2DModuleAugmentations.d.ts) for working with Emscripten types.
51-
52-
### Development differences
53-
54-
As for _how it's developed_, the differences from `box2d.js` are:
55-
56-
- Different build system, to support the newer cmake build system introduced in Box2D v2.4.0.
57-
- Different approach to version controlling source code and build output
58-
59-
More detail at [`README.project-aims.md`](README.project-aims.md).
27+
- [Comparison with `box2d.js`](README.comparison-with-box2d-js.md)
28+
- [Project aims](README.project-aims.md)
6029

6130
## Developing in this monorepo
6231

0 commit comments

Comments
 (0)