This is a Dart port of Java's Box2D libraries.
The Java Box2D library was originally written by Daniel Murphy (status February 2015).
benchmark/bench2d.dart Benchmark used by Joel Webber example/index.html Browser demos as written by Dominic Hamon lib/ Port of Daniel Murphy's jbox2d
First Dart port of an earlier version of Box2D library was done by Dominic Hamon. We are grateful for his work.
Not an official Google project
implicit-dynamicoff). This means many API points are now more strongly typed (
double). Fix errors by providing doubles where they are expected (
num fraction = .5will become
double fraction = .5), and explicitly casting joints (
world.createJoint(jointDef) as RevoluteJoint).
velocityThresholdmutable (as per jbox2d and other box2d implementations).
Add this to your package's pubspec.yaml file:
dependencies: box2d_flame: ^0.4.3
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:box2d_flame/box2d.dart'; import 'package:box2d_flame/box2d_browser.dart';
|0.4.3||Jan 30, 2019|
|0.4.2||Aug 25, 2018|
|0.4.1||Jul 15, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Feb 20, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: web
Platform components identified in package:
lib/src/collision/contactid.dart. (-1.99 points)
lib/src/collision/contactid.dart reported 4 hints:
line 32 col 3: Avoid return types on setters.
line 36 col 3: Avoid return types on setters.
line 40 col 3: Avoid return types on setters.
line 44 col 3: Avoid return types on setters.
lib/src/dynamics/joints/joint_edge.dart. (-1.99 points)
lib/src/dynamics/joints/joint_edge.dart reported 4 hints:
line 39 col 8: Don't explicitly initialize variables to null.
line 44 col 9: Don't explicitly initialize variables to null.
line 49 col 13: Don't explicitly initialize variables to null.
line 54 col 13: Don't explicitly initialize variables to null.
lib/src/particle/particle_color.dart. (-1.99 points)
lib/src/particle/particle_color.dart reported 4 hints:
line 35 col 3: Avoid return types on setters.
line 39 col 3: Avoid return types on setters.
line 43 col 3: Avoid return types on setters.
line 47 col 3: Avoid return types on setters.
Fix additional 5 files with analysis or formatting issues. (-3.99 points)
Additional issues in the following files:
Maintain an example.
None of the files in the package's
example/ directory matches known example patterns.
Common filename patterns include
box2d_flame.dart. Packages with multiple examples should provide
For more information see the pub package layout conventions.
|Dart SDK||>=2.0.0-dev.50.0 <3.0.0|