From 26446d28d632c310178bb8f9839fc11fc89f7cca Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 20 Jul 2026 19:29:16 +0000 Subject: [PATCH 1/5] chore(release): publish packages - forge2d@0.15.0+2 --- CHANGELOG.md | 23 +++++++++++++++++++++++ packages/benchmark/pubspec.yaml | 2 +- packages/forge2d/CHANGELOG.md | 8 ++++++++ packages/forge2d/example/pubspec.yaml | 2 +- packages/forge2d/pubspec.yaml | 2 +- 5 files changed, 34 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d125823..771baae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,29 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## 2026-07-20 + +### Changes + +--- + +Packages with breaking changes: + + - [`forge2d` - `v0.15.0+2`](#forge2d---v01502) + +Packages with other changes: + + - There are no other changes in this release. + +--- + +#### `forge2d` - `v0.15.0+2` + + - **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)) + - **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)) + - **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)) + + ## 2025-10-26 ### Changes diff --git a/packages/benchmark/pubspec.yaml b/packages/benchmark/pubspec.yaml index 9e9cce4c..ba6d4fbd 100644 --- a/packages/benchmark/pubspec.yaml +++ b/packages/benchmark/pubspec.yaml @@ -10,7 +10,7 @@ environment: sdk: ^3.12.0 dependencies: - forge2d: ^0.14.2+1 + forge2d: ^0.15.0+2 dev_dependencies: flame_lint: ^1.4.1 diff --git a/packages/forge2d/CHANGELOG.md b/packages/forge2d/CHANGELOG.md index b6afe083..06619f29 100644 --- a/packages/forge2d/CHANGELOG.md +++ b/packages/forge2d/CHANGELOG.md @@ -1,3 +1,11 @@ +## 0.15.0+2 + +> Note: This release has breaking changes. + + - **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)) + - **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)) + - **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)) + ## 0.14.2+1 - **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)) diff --git a/packages/forge2d/example/pubspec.yaml b/packages/forge2d/example/pubspec.yaml index d3eb5546..b0fb5cdd 100644 --- a/packages/forge2d/example/pubspec.yaml +++ b/packages/forge2d/example/pubspec.yaml @@ -9,7 +9,7 @@ environment: sdk: ^3.12.0 dependencies: - forge2d: ^0.14.2+1 + forge2d: ^0.15.0+2 web: ^1.1.1 dev_dependencies: diff --git a/packages/forge2d/pubspec.yaml b/packages/forge2d/pubspec.yaml index 897973e5..aefc6135 100644 --- a/packages/forge2d/pubspec.yaml +++ b/packages/forge2d/pubspec.yaml @@ -1,5 +1,5 @@ name: forge2d -version: 0.14.2+1 +version: 0.15.0+2 description: A 2D physics engine for Dart, binding to the native Box2D v3 library. Also works with the Flame game engine in Flutter. homepage: https://github.com/flame-engine/forge2d resolution: workspace From af5cdb9175344196570ddb87286a1fae80113772 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Mon, 20 Jul 2026 21:30:53 +0200 Subject: [PATCH 2/5] docs: Link to the Forge2D migration guide from the README --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ff7f3375..a0f3bbb0 100644 --- a/README.md +++ b/README.md @@ -93,8 +93,10 @@ The standard [bench2d](https://github.com/joelgwebber/bench2d) benchmark ## Migrating from forge2d 0.14 -Forge2D 0.15 is a ground-up rewrite on the Box2D v3 API. The high-level -concepts map as follows: +Forge2D 0.15 is a ground-up rewrite on the Box2D v3 API. For the full +walkthrough, see the [Forge2D migration +guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html). +The high-level concepts map as follows: - Call `await initializeForge2D()` once before creating a world. - `Fixture` is gone: bodies now carry `Shape`s directly, created with From 3b8f5b6f73975d61fbbce0b794b970e3b9f9a006 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Mon, 20 Jul 2026 21:42:46 +0200 Subject: [PATCH 3/5] docs: Correct and expand the 0.14 migration section in the README --- README.md | 52 ++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index a0f3bbb0..0ee85808 100644 --- a/README.md +++ b/README.md @@ -98,21 +98,48 @@ walkthrough, see the [Forge2D migration guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html). The high-level concepts map as follows: -- Call `await initializeForge2D()` once before creating a world. -- `Fixture` is gone: bodies now carry `Shape`s directly, created with +- Dart 3.12+ and a C toolchain are required, see [Requirements](#requirements). + This is usually the biggest practical hurdle of the upgrade. +- On the web, `await initializeForge2D()` has to run before the first + `World` is created. On native it is a no-op (the backend is created + lazily), but cross-platform code should always await it. +- `World`, `Body`, `Shape`, `Chain`, and joints are value-like handles over + native ids rather than Dart objects owning their state. Nothing is + garbage collected: destroy things explicitly, and check `isValid` if a + handle may have outlived what it points at. +- `Fixture` is gone: bodies carry `Shape`s directly, created with `body.createShape(geometry, ShapeDef(...))` where the geometry is a - `Circle`, `Capsule`, `Segment`, `Polygon`, or a `Chain` via - `body.createChain`. + `Circle`, `Capsule`, `Segment`, or `Polygon`. Chains have their own + `body.createChain(ChainDef(points: ...))`. - `EdgeShape` is replaced by `Segment` (standalone) and one-sided chain shapes for level geometry. -- `ContactListener` callbacks are replaced by polled events: - `world.contactEvents` after each step, opted in per shape with - `ShapeDef(enableContactEvents: true)`. -- Query and ray-cast callback classes are replaced by methods on `World` - returning results directly. -- The joints are now distance, filter, motor, mouse, prismatic, revolute, - weld, and wheel. Gear, pulley, rope, friction, and constant-volume - joints do not exist in Box2D v3. +- Friction, restitution, and rolling resistance live on + `ShapeDef(material: SurfaceMaterial(...))` instead of being fields on the + old `FixtureDef`. +- `ContactListener` callbacks are replaced by events polled after each + step: `world.contactEvents`, `world.sensorEvents`, and + `world.bodyMoveEvents`. Contact and sensor events are opted in per shape + with `ShapeDef(enableContactEvents: true)` and + `ShapeDef(isSensor: true, enableSensorEvents: true)`; hit events need + `enableHitEvents`. Custom filtering is a `world.customFilterCallback`. +- Query and ray-cast callback classes are gone: `world.castRayClosest`, + `world.castRayAll`, and `world.overlapAabb` return their results + directly, and `world.castRay` takes a plain closure. `AABB` is now + `Aabb`. +- Joints are created with type-specific methods such as + `world.createRevoluteJoint(RevoluteJointDef(...))`, and the set is now + distance, filter, motor, mouse, prismatic, revolute, weld, and wheel. + Gear, pulley, rope, friction, and constant-volume joints do not exist in + Box2D v3. +- Rotations are a `Rot` rather than a raw angle: `BodyDef(rotation: ...)` + and `body.setTransform(position, rotation)` take one, built with + `Rot.fromAngle(radians)`. `body.angle` still reads back a double. +- `body.applyForce` and `body.applyLinearImpulse` take the point of + application as a named argument, `applyForce(force, point: ..., wake: + true)`, and applying at the centre of mass is just leaving `point` out. + `applyForceToCenter` is gone. +- `DebugDraw` is an abstract class you implement and pass to + `world.draw(debugDraw)`, with colors as `0xRRGGBB` ints. - The particle system (LiquidFun) is not part of Box2D v3 and has been removed; stay on forge2d 0.14 if you depend on it. - Worlds default to `subStepCount: 4` in `step` instead of velocity and @@ -123,6 +150,7 @@ The high-level concepts map as follows: - Destroying bodies, shapes, chains, or joints while the world is stepping (from a collision callback) is deferred until the step ends; creating them mid-step throws a `StateError` instead of the old silent queueing. + `world.destroy()` itself is not deferred and throws mid-step. ## Timeline From 60ed9a5747f3a6350f77d6ea44da1fed20c219b3 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Mon, 20 Jul 2026 21:43:49 +0200 Subject: [PATCH 4/5] docs: Link to the migration guide from the 0.15.0+2 changelog entries --- CHANGELOG.md | 3 +++ packages/forge2d/CHANGELOG.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 771baae4..4b28e183 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ Packages with other changes: #### `forge2d` - `v0.15.0+2` +> Upgrading from 0.14 requires code changes throughout: see the +> [Forge2D migration guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html). + - **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)) - **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)) - **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)) diff --git a/packages/forge2d/CHANGELOG.md b/packages/forge2d/CHANGELOG.md index 06619f29..861b4a55 100644 --- a/packages/forge2d/CHANGELOG.md +++ b/packages/forge2d/CHANGELOG.md @@ -1,6 +1,9 @@ ## 0.15.0+2 > Note: This release has breaking changes. +> +> Upgrading from 0.14 requires code changes throughout: see the +> [Forge2D migration guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html). - **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)) - **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)) From 96914fbf36b3b6f4c9c2675077e9ba4e17ed6a86 Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Mon, 20 Jul 2026 21:45:11 +0200 Subject: [PATCH 5/5] chore(release): Publish forge2d 0.15.0 instead of 0.15.0+2 --- CHANGELOG.md | 4 ++-- packages/benchmark/pubspec.yaml | 2 +- packages/forge2d/CHANGELOG.md | 2 +- packages/forge2d/example/pubspec.yaml | 2 +- packages/forge2d/pubspec.yaml | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b28e183..8b279edd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,7 +11,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline Packages with breaking changes: - - [`forge2d` - `v0.15.0+2`](#forge2d---v01502) + - [`forge2d` - `v0.15.0`](#forge2d---v0150) Packages with other changes: @@ -19,7 +19,7 @@ Packages with other changes: --- -#### `forge2d` - `v0.15.0+2` +#### `forge2d` - `v0.15.0` > Upgrading from 0.14 requires code changes throughout: see the > [Forge2D migration guide](https://docs.flame-engine.org/main/other_modules/forge2d/migration.html). diff --git a/packages/benchmark/pubspec.yaml b/packages/benchmark/pubspec.yaml index ba6d4fbd..bf31f6ad 100644 --- a/packages/benchmark/pubspec.yaml +++ b/packages/benchmark/pubspec.yaml @@ -10,7 +10,7 @@ environment: sdk: ^3.12.0 dependencies: - forge2d: ^0.15.0+2 + forge2d: ^0.15.0 dev_dependencies: flame_lint: ^1.4.1 diff --git a/packages/forge2d/CHANGELOG.md b/packages/forge2d/CHANGELOG.md index 861b4a55..29adb269 100644 --- a/packages/forge2d/CHANGELOG.md +++ b/packages/forge2d/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.15.0+2 +## 0.15.0 > Note: This release has breaking changes. > diff --git a/packages/forge2d/example/pubspec.yaml b/packages/forge2d/example/pubspec.yaml index b0fb5cdd..0528d7de 100644 --- a/packages/forge2d/example/pubspec.yaml +++ b/packages/forge2d/example/pubspec.yaml @@ -9,7 +9,7 @@ environment: sdk: ^3.12.0 dependencies: - forge2d: ^0.15.0+2 + forge2d: ^0.15.0 web: ^1.1.1 dev_dependencies: diff --git a/packages/forge2d/pubspec.yaml b/packages/forge2d/pubspec.yaml index aefc6135..b508af49 100644 --- a/packages/forge2d/pubspec.yaml +++ b/packages/forge2d/pubspec.yaml @@ -1,5 +1,5 @@ name: forge2d -version: 0.15.0+2 +version: 0.15.0 description: A 2D physics engine for Dart, binding to the native Box2D v3 library. Also works with the Flame game engine in Flutter. homepage: https://github.com/flame-engine/forge2d resolution: workspace