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.1
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.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 Aug 10, 2018, 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/particle/particle_system.dart failed with 15 errors, including:
line 950 col 47: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 984 col 22: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 1012 col 58: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 1081 col 32: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 1082 col 32: The getter 'MAX_FINITE' isn't defined for the class 'double'.
lib/src/collision/collision.dart failed with 6 errors, including:
line 358 col 33: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 540 col 36: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 547 col 26: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 603 col 28: The getter 'MAX_FINITE' isn't defined for the class 'double'.
line 1415 col 30: The getter 'MAX_FINITE' isn't defined for the class 'double'.
Add SDK constraint in
For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.
Fix additional 13 files with analysis or formatting issues.
Additional issues in the following files:
The description is too short.
Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.
Package is pre-v1 release.
While there is nothing inherently wrong with versions of
0.*.*, it usually means that the author is still experimenting with the general direction of the API.
Maintain an example.
None of the files in your
example/ directory matches a known example patterns. Common file name patterns include:
example.dart or you could also use