compass 0.0.5

  • Installing
  • Versions
  • 27


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;



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


This feature is new.
We welcome feedback.
More details: scoring.

We analyzed this package, and provided a score, details, and suggestions below.

  • tool failures on Jan 21, 2018
  • Dart: 2.0.0-dev.15.0
  • pana: 0.10.0


Describes how popular the package is relative to other packages. [more]
0 / 100
Code health derived from static analysis. [more]
89 / 100
Reflects how tidy and up-to-date the package is. [more]
0 / 100
Overall score:
Weighted score of the above. [more]


Detected platforms: unsure

Error(s) prevent platform classification.


  • Fix lib/compass.dart.

    Strong-mode analysis of lib/compass.dart failed with the following error:

    line: 4 col: 8
    Target of URI doesn't exist: 'dart:json'.

  • Fix lib/src/geom/vector.dart.

    Strong-mode analysis of lib/src/geom/vector.dart failed with the following error:

    line: 31 col: 3
    Invalid override. The type of 'Vector.==' ('(Vector) → bool') isn't a subtype of 'Object.==' ('(dynamic) → bool').

  • Fix further 1 Dart files.

    Similar analysis of the following files failed:

    • lib/src/renderer/renderer.dart
  • Fix platform conflicts.

    Make sure none of the libraries use mutually exclusive dependendencies.

  • Maintain

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

  • Fix issues reported by dartanalyzer.

    dartanalyzer reported 3 error(s) and 0 warning(s).

  • Use constrained dependencies.

    The pubspec.yaml contains 3 dependencies without version constraints. Specify version ranges for the following dependencies: browser, stats, vector_math.

  • 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 API.

  • Maintain an example.

    None of the files in your example/ directory matches a known example patterns. Common file name patterns include: main.dart, example.dart or you could also use compass.dart.


Package Constraint Resolved Available
Direct dependencies
browser any 0.10.0+2
stats any 0.1.2
vector_math any 2.0.5
Transitive dependencies
matcher 0.10.1+1 0.12.1+4
mock 0.10.0+1 0.12.0
path 1.5.1
stack_trace 0.9.3+2 1.9.1
unittest 0.10.1+2 0.12.4+1