compass 0.0.5

  • Installing
  • Versions
  • 3


A 2D rendering engine that uses WebGL


  • WebGL renderer
  • Super easy to use API
  • Support for texture atlases
  • Asset loader / sprite sheet loade
  • Mouse interaction
  • Keyboard state

Installing via Pub


  compass: any


void main() {
  CanvasElement canvas = query('#container');
  director.background = Color.parse(Color.Green);
  director.replace(new SimpleTest());

class SimpleTest extends Scene {
  enter() {
    var rng = new Random();
    for(var i = 0; i < 10000; i++) {
      var sprite = new Sprite();
      sprite.fill = Color.random();
      sprite.width = rng.nextDouble() * 50;
      sprite.height = rng.nextDouble() * 50;
      sprite.x = rng.nextDouble() * director.width;
      sprite.y = rng.nextDouble() * director.height;



Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  compass: ^0.0.5

2. Install it

You can install packages from the command line:

with pub:

$ pub get

Alternatively, your editor might support pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:compass/compass.dart';
Version Uploaded Documentation Archive
0.0.5 Jul 19, 2013 Go to the documentation of compass 0.0.5 Download compass 0.0.5 archive
0.0.4 Jul 17, 2013 Go to the documentation of compass 0.0.4 Download compass 0.0.4 archive
0.0.3 Jul 14, 2013 Go to the documentation of compass 0.0.3 Download compass 0.0.3 archive
0.0.2 Jul 12, 2013 Go to the documentation of compass 0.0.2 Download compass 0.0.2 archive
0.0.1 Jul 12, 2013 Go to the documentation of compass 0.0.1 Download compass 0.0.1 archive
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]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Analysis issues and suggestions

Fix dependencies in pubspec.yaml.

Running pub upgrade failed with the following output:

ERR: The current Dart SDK version is 2.0.0.
 Because compass depends on stats any which requires SDK version <2.0.0, version solving failed.

Health suggestions

Format lib/compass.dart.

Run dartfmt to format lib/compass.dart.

Format lib/src/animation/animatable.dart.

Run dartfmt to format lib/src/animation/animatable.dart.

Format lib/src/animation/juggler.dart.

Run dartfmt to format lib/src/animation/juggler.dart.

Fix additional 26 files with analysis or formatting issues.

Additional issues in the following files:

  • lib/src/director.dart (Run dartfmt to format lib/src/director.dart.)
  • lib/src/display/displayobject.dart (Run dartfmt to format lib/src/display/displayobject.dart.)
  • lib/src/display/interactiveobject.dart (Run dartfmt to format lib/src/display/interactiveobject.dart.)
  • lib/src/display/layer.dart (Run dartfmt to format lib/src/display/layer.dart.)
  • lib/src/display/scene.dart (Run dartfmt to format lib/src/display/scene.dart.)
  • lib/src/display/sprite.dart (Run dartfmt to format lib/src/display/sprite.dart.)
  • lib/src/display/spritesheet.dart (Run dartfmt to format lib/src/display/spritesheet.dart.)
  • lib/src/event/eventdispatcher.dart (Run dartfmt to format lib/src/event/eventdispatcher.dart.)
  • lib/src/event/events.dart (Run dartfmt to format lib/src/event/events.dart.)
  • lib/src/event/eventsubscription.dart (Run dartfmt to format lib/src/event/eventsubscription.dart.)
  • lib/src/fill/color.dart (Run dartfmt to format lib/src/fill/color.dart.)
  • lib/src/fill/fill.dart (Run dartfmt to format lib/src/fill/fill.dart.)
  • lib/src/fill/image.dart (Run dartfmt to format lib/src/fill/image.dart.)
  • lib/src/fill/textureatlas.dart (Run dartfmt to format lib/src/fill/textureatlas.dart.)
  • lib/src/fill/textureatlasframe.dart (Run dartfmt to format lib/src/fill/textureatlasframe.dart.)
  • lib/src/geom/circle.dart (Run dartfmt to format lib/src/geom/circle.dart.)
  • lib/src/geom/point.dart (Run dartfmt to format lib/src/geom/point.dart.)
  • lib/src/geom/rectangle.dart (Run dartfmt to format lib/src/geom/rectangle.dart.)
  • lib/src/geom/vector.dart (Run dartfmt to format lib/src/geom/vector.dart.)
  • lib/src/interactionmanager.dart (Run dartfmt to format lib/src/interactionmanager.dart.)
  • lib/src/keyboard.dart (Run dartfmt to format lib/src/keyboard.dart.)
  • lib/src/renderer/renderbatch.dart (Run dartfmt to format lib/src/renderer/renderbatch.dart.)
  • lib/src/renderer/renderer.dart (Run dartfmt to format lib/src/renderer/renderer.dart.)
  • lib/src/resource/resource.dart (Run dartfmt to format lib/src/resource/resource.dart.)
  • lib/src/resource/resourcemanager.dart (Run dartfmt to format lib/src/resource/resourcemanager.dart.)
  • lib/src/state.dart (Run dartfmt to format lib/src/state.dart.)

Maintenance issues and suggestions

Fix platform conflicts. (-20 points)

Error(s) prevent platform classification:

Fix dependencies in pubspec.yaml.

Running dartdoc failed. (-10 points)

Make sure dartdoc runs without any issues.

Package is too old. (-100 points)

The package was released more than two years ago.

Maintain (-20 points)

Changelog entries help clients to follow the progress in your code.

Add SDK constraint in pubspec.yaml. (-5 points)

For information about setting SDK constraint, please see

The description is too short. (-20 points)

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-v0.1 release. (-10 points)

While there is nothing inherently wrong with versions of 0.0.*, it usually means that the author is still experimenting with the general direction of the API.