Skip to content

Commit 49dd404

Browse files
chore(release): Publish packages (#118)
Prepared all packages to be released to pub.dev --------- Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>
1 parent 664f944 commit 49dd404

6 files changed

Lines changed: 85 additions & 18 deletions

File tree

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,32 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## 2026-07-20
7+
8+
### Changes
9+
10+
---
11+
12+
Packages with breaking changes:
13+
14+
- [`forge2d` - `v0.15.0`](#forge2d---v0150)
15+
16+
Packages with other changes:
17+
18+
- There are no other changes in this release.
19+
20+
---
21+
22+
#### `forge2d` - `v0.15.0`
23+
24+
> Upgrading from 0.14 requires code changes throughout: see the
25+
> [Forge2D migration guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html).
26+
27+
- **FEAT**: Add an interactive web example gallery deployed to GitHub Pages ([#117](https://github.com/flame-engine/forge2d/issues/117)). ([664f9443](https://github.com/flame-engine/forge2d/commit/664f9443e72c3261ed8149c0a267348e05cc0d1c))
28+
- **FEAT**: Run on the web via a WebAssembly build of Box2D ([#116](https://github.com/flame-engine/forge2d/issues/116)). ([409b2750](https://github.com/flame-engine/forge2d/commit/409b27507936ae1d7c0a67ff211d24687c6d06c3))
29+
- **BREAKING** **FEAT**: Replace the pure-Dart engine with native Box2D v3 bindings ([#115](https://github.com/flame-engine/forge2d/issues/115)). ([3ea15287](https://github.com/flame-engine/forge2d/commit/3ea152877a3c2a71b0b0666823fffb32102bf53b))
30+
31+
632
## 2025-10-26
733

834
### Changes

README.md

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -93,24 +93,53 @@ The standard [bench2d](https://github.com/joelgwebber/bench2d) benchmark
9393

9494
## Migrating from forge2d 0.14
9595

96-
Forge2D 0.15 is a ground-up rewrite on the Box2D v3 API. The high-level
97-
concepts map as follows:
98-
99-
- Call `await initializeForge2D()` once before creating a world.
100-
- `Fixture` is gone: bodies now carry `Shape`s directly, created with
96+
Forge2D 0.15 is a ground-up rewrite on the Box2D v3 API. For the full
97+
walkthrough, see the [Forge2D migration
98+
guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html).
99+
The high-level concepts map as follows:
100+
101+
- Dart 3.12+ and a C toolchain are required, see [Requirements](#requirements).
102+
This is usually the biggest practical hurdle of the upgrade.
103+
- On the web, `await initializeForge2D()` has to run before the first
104+
`World` is created. On native it is a no-op (the backend is created
105+
lazily), but cross-platform code should always await it.
106+
- `World`, `Body`, `Shape`, `Chain`, and joints are value-like handles over
107+
native ids rather than Dart objects owning their state. Nothing is
108+
garbage collected: destroy things explicitly, and check `isValid` if a
109+
handle may have outlived what it points at.
110+
- `Fixture` is gone: bodies carry `Shape`s directly, created with
101111
`body.createShape(geometry, ShapeDef(...))` where the geometry is a
102-
`Circle`, `Capsule`, `Segment`, `Polygon`, or a `Chain` via
103-
`body.createChain`.
112+
`Circle`, `Capsule`, `Segment`, or `Polygon`. Chains have their own
113+
`body.createChain(ChainDef(points: ...))`.
104114
- `EdgeShape` is replaced by `Segment` (standalone) and one-sided chain
105115
shapes for level geometry.
106-
- `ContactListener` callbacks are replaced by polled events:
107-
`world.contactEvents` after each step, opted in per shape with
108-
`ShapeDef(enableContactEvents: true)`.
109-
- Query and ray-cast callback classes are replaced by methods on `World`
110-
returning results directly.
111-
- The joints are now distance, filter, motor, mouse, prismatic, revolute,
112-
weld, and wheel. Gear, pulley, rope, friction, and constant-volume
113-
joints do not exist in Box2D v3.
116+
- Friction, restitution, and rolling resistance live on
117+
`ShapeDef(material: SurfaceMaterial(...))` instead of being fields on the
118+
old `FixtureDef`.
119+
- `ContactListener` callbacks are replaced by events polled after each
120+
step: `world.contactEvents`, `world.sensorEvents`, and
121+
`world.bodyMoveEvents`. Contact and sensor events are opted in per shape
122+
with `ShapeDef(enableContactEvents: true)` and
123+
`ShapeDef(isSensor: true, enableSensorEvents: true)`; hit events need
124+
`enableHitEvents`. Custom filtering is a `world.customFilterCallback`.
125+
- Query and ray-cast callback classes are gone: `world.castRayClosest`,
126+
`world.castRayAll`, and `world.overlapAabb` return their results
127+
directly, and `world.castRay` takes a plain closure. `AABB` is now
128+
`Aabb`.
129+
- Joints are created with type-specific methods such as
130+
`world.createRevoluteJoint(RevoluteJointDef(...))`, and the set is now
131+
distance, filter, motor, mouse, prismatic, revolute, weld, and wheel.
132+
Gear, pulley, rope, friction, and constant-volume joints do not exist in
133+
Box2D v3.
134+
- Rotations are a `Rot` rather than a raw angle: `BodyDef(rotation: ...)`
135+
and `body.setTransform(position, rotation)` take one, built with
136+
`Rot.fromAngle(radians)`. `body.angle` still reads back a double.
137+
- `body.applyForce` and `body.applyLinearImpulse` take the point of
138+
application as a named argument, `applyForce(force, point: ..., wake:
139+
true)`, and applying at the centre of mass is just leaving `point` out.
140+
`applyForceToCenter` is gone.
141+
- `DebugDraw` is an abstract class you implement and pass to
142+
`world.draw(debugDraw)`, with colors as `0xRRGGBB` ints.
114143
- The particle system (LiquidFun) is not part of Box2D v3 and has been
115144
removed; stay on forge2d 0.14 if you depend on it.
116145
- Worlds default to `subStepCount: 4` in `step` instead of velocity and
@@ -121,6 +150,7 @@ concepts map as follows:
121150
- Destroying bodies, shapes, chains, or joints while the world is stepping
122151
(from a collision callback) is deferred until the step ends; creating
123152
them mid-step throws a `StateError` instead of the old silent queueing.
153+
`world.destroy()` itself is not deferred and throws mid-step.
124154

125155
## Timeline
126156

packages/benchmark/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
sdk: ^3.12.0
1111

1212
dependencies:
13-
forge2d: ^0.14.2+1
13+
forge2d: ^0.15.0
1414

1515
dev_dependencies:
1616
flame_lint: ^1.4.1

packages/forge2d/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 0.15.0
2+
3+
> Note: This release has breaking changes.
4+
>
5+
> Upgrading from 0.14 requires code changes throughout: see the
6+
> [Forge2D migration guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html).
7+
8+
- **FEAT**: Add an interactive web example gallery deployed to GitHub Pages ([#117](https://github.com/flame-engine/forge2d/issues/117)). ([664f9443](https://github.com/flame-engine/forge2d/commit/664f9443e72c3261ed8149c0a267348e05cc0d1c))
9+
- **FEAT**: Run on the web via a WebAssembly build of Box2D ([#116](https://github.com/flame-engine/forge2d/issues/116)). ([409b2750](https://github.com/flame-engine/forge2d/commit/409b27507936ae1d7c0a67ff211d24687c6d06c3))
10+
- **BREAKING** **FEAT**: Replace the pure-Dart engine with native Box2D v3 bindings ([#115](https://github.com/flame-engine/forge2d/issues/115)). ([3ea15287](https://github.com/flame-engine/forge2d/commit/3ea152877a3c2a71b0b0666823fffb32102bf53b))
11+
112
## 0.14.2+1
213

314
- **FIX**: Create and destroy joints after world has been locked ([#110](https://github.com/flame-engine/forge2d/issues/110)). ([0704959f](https://github.com/flame-engine/forge2d/commit/0704959fa0ef904a056228846c006498d9361520))

packages/forge2d/example/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
sdk: ^3.12.0
1010

1111
dependencies:
12-
forge2d: ^0.14.2+1
12+
forge2d: ^0.15.0
1313
web: ^1.1.1
1414

1515
dev_dependencies:

packages/forge2d/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: forge2d
2-
version: 0.14.2+1
2+
version: 0.15.0
33
description: A 2D physics engine for Dart, binding to the native Box2D v3 library. Also works with the Flame game engine in Flutter.
44
homepage: https://github.com/flame-engine/forge2d
55
resolution: workspace

0 commit comments

Comments
 (0)