diff --git a/melos.yaml b/melos.yaml index 3197066..e4d49cf 100644 --- a/melos.yaml +++ b/melos.yaml @@ -16,6 +16,8 @@ command: environment: sdk: ">=3.0.0 <4.0.0" bootstrap: + environment: + sdk: ">=3.0.0 <4.0.0" dependencies: meta: ^1.11.0 vector_math: ^2.1.4 @@ -75,3 +77,8 @@ scripts: run: melos exec -- dart pub global run webdev serve --release packageFilters: scope: forge2d_benchmark + + example: + run: melos exec -- dart pub global run webdev serve --release + packageFilters: + scope: forge2d_examples \ No newline at end of file diff --git a/packages/benchmark/pubspec.yaml b/packages/benchmark/pubspec.yaml index ca0dc9c..f616c67 100644 --- a/packages/benchmark/pubspec.yaml +++ b/packages/benchmark/pubspec.yaml @@ -6,7 +6,7 @@ version: 1.0.0+1 publish_to: 'none' environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: build_runner: ^2.4.5 diff --git a/packages/forge2d/example/pubspec.yaml b/packages/forge2d/example/pubspec.yaml index 3120193..a4b2353 100644 --- a/packages/forge2d/example/pubspec.yaml +++ b/packages/forge2d/example/pubspec.yaml @@ -6,12 +6,12 @@ version: 1.0.0+1 publish_to: 'none' environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: - build_runner: ^2.4.5 - build_web_compilers: ^4.0.3 forge2d: ^0.11.0 dev_dependencies: + build_runner: ^2.4.5 + build_web_compilers: ^4.0.4 flame_lint: ^1.1.1 diff --git a/packages/forge2d/example/web/demo.dart b/packages/forge2d/example/web/demo.dart index 4991d34..6edfade 100644 --- a/packages/forge2d/example/web/demo.dart +++ b/packages/forge2d/example/web/demo.dart @@ -43,7 +43,7 @@ abstract class Demo { late final DebugDraw debugDraw; /// Frame count for fps - late final int frameCount; + int frameCount = 0; /// HTML element used to display the FPS counter late final Element fpsCounter; @@ -96,7 +96,6 @@ abstract class Demo { // Have the world draw itself for debugging purposes. world.debugDraw = debugDraw; - frameCount = 0; fpsCounter = querySelector('#fps-counter')!; worldStepTime = querySelector('#world-step-time')!; Timer.periodic(const Duration(seconds: 1), (Timer t) { diff --git a/packages/forge2d/example/web/domino_test.dart b/packages/forge2d/example/web/domino_test.dart index 463e944..12e052e 100644 --- a/packages/forge2d/example/web/domino_test.dart +++ b/packages/forge2d/example/web/domino_test.dart @@ -11,7 +11,7 @@ class DominoTest extends Demo { { // Floor final shape = PolygonShape()..setAsBoxXY(50.0, 10.0); - final fixtureDef = FixtureDef(shape); + final fixtureDef = FixtureDef(shape)..friction = 0.1; final bd = BodyDef(); bd.position = Vector2(0.0, -10.0); @@ -24,7 +24,7 @@ class DominoTest extends Demo { // Platforms for (var i = 0; i < 4; i++) { final shape = PolygonShape()..setAsBoxXY(15.0, 0.125); - final fixtureDef = FixtureDef(shape); + final fixtureDef = FixtureDef(shape)..friction = 0.1; final bodyDef = BodyDef()..position = Vector2(0.0, 5.0 + 5 * i); final body = world.createBody(bodyDef); diff --git a/packages/forge2d/pubspec.yaml b/packages/forge2d/pubspec.yaml index 771a863..c272aba 100644 --- a/packages/forge2d/pubspec.yaml +++ b/packages/forge2d/pubspec.yaml @@ -4,7 +4,7 @@ description: A 2D physics engine for Dart (based on Box2D), also works with the homepage: https://github.com/flame-engine/forge2d environment: - sdk: ">=2.17.0 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: meta: ^1.11.0