stagexl_isometric 0.2.0+1

StageXL_Isometric #

An isometric graphics extension for StageXL.

This is work in progress...

NOTE: as of version 0.2.0-dev, StageXL_Isometric requires a Dart 2 SDK.

Change Log #

This file contains highlights of what changes on each version of the StageXL_Isometric package. This file is normally updated whenever we push a new version to pub.

Pub version 0.2.0 #

  • Raised dependency to StageXL 1.4.0
  • Raised dependency to Dart 2.0 stable

Pub version 0.2.0-dev #

  • Raised dependency to StageXL 1.3.2-dev
  • Ready for Dart 2.0

Pub version 0.1.2 #

  • Added support for strong mode
  • Raised dependency to Dart SDK 1.22.0 (reason: covariant keyword)

example/example.dart

library example01;

import 'dart:html' as html;
import 'package:stagexl/stagexl.dart';
import 'package:stagexl_isometric/stagexl_isometric.dart';

void main() {

  StageXL.stageOptions.renderEngine = RenderEngine.Canvas2D;
  StageXL.stageOptions.backgroundColor = Color.AntiqueWhite;

  var canvas = html.querySelector('#stage');
  var stage = new Stage(canvas);
  var renderLoop = new RenderLoop();
  renderLoop.addStage(stage);

  var background = new Bitmap(new BitmapData(800,600, 0x869ca7));
  stage.addChild(background);

  //var app = new IsoApplication1();
  //var app = new IsoApplication2();
  var app = new IsoApplication3();
  app.x = 400;
  app.y = 200;
  stage.addChild(app);

}

class IsoApplication1 extends Sprite {
  IsoApplication1() {
    var box = new IsoBox();
    box.setSize(25, 25, 25);
    box.moveTo(0, 0, 0);

    var grid = new IsoGrid();
    grid.showOrigin = true;
    grid.setGridSize(10, 10);
    grid.moveTo(0, 0, 0);

    var scene = new IsoScene();
    scene.hostContainer = this;
    scene.addChild(box);
    scene.addChild(grid);
    scene.isoRender();
  }
}

class IsoApplication2 extends Sprite {
  IsoApplication2() {
    var box = new IsoBox();
    box.styleType = RenderStyleType.SHADED;
    box.fills = [
      new SolidColorFill(0xff0000, .5),
      new SolidColorFill(0x00ff00, .5),
      new SolidColorFill(0x0000ff, .5),
      new SolidColorFill(0xff0000, .5),
      new SolidColorFill(0x00ff00, .5),
      new SolidColorFill(0x0000ff, .5)];
    box.setSize(25, 50, 40);
    box.moveTo(0, 0, 0);

    var grid = new IsoGrid();
    grid.showOrigin = true;
    grid.setGridSize(10, 10);
    grid.moveTo(0, 0, 0);

    var scene = new IsoScene();
    scene.hostContainer = this;
    scene.addChild(grid);
    scene.addChild(box);
    scene.isoRender();
  }
}

class IsoApplication3 extends Sprite {
  IsoApplication3() {
    var box = new IsoBox();
    box.setSize(25, 25, 25);
    box.fills = [
      new SolidColorFill(0xff00ff, 1),
      new SolidColorFill(0xff00ff, 1),
      new SolidColorFill(0xff00ff, 1),
      new SolidColorFill(0xff00ff, 1),
      new SolidColorFill(0xff00ff, 1),
      new SolidColorFill(0xff00ff, 1)];
    box.moveTo(0, 25, 0);

    var box2 = new IsoBox();
    box2.setSize(25, 25, 25);
    box2.fills = [
      new SolidColorFill(0xffff00, 1),
      new SolidColorFill(0xffff00, 1),
      new SolidColorFill(0xffff00, 1),
      new SolidColorFill(0xffff00, 1),
      new SolidColorFill(0xffff00, 1),
      new SolidColorFill(0xffff00, 1)];
    box2.moveTo(25, 25, 0);

    var box3 = new IsoBox();
    box3.setSize(25, 25, 25);
    box3.moveTo(25, 0, 0);

    var grid = new IsoGrid();
    grid.showOrigin = true;
    grid.setGridSize(10, 10);
    grid.moveTo(0, 0, 0);

    var scene = new IsoScene();
    scene.hostContainer = this;
    scene.addChild(grid);

    scene.addChild(box2);
    scene.addChild(box);
    scene.addChild(box3);
    scene.layoutEnabled = true;
    scene.isoRender();
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  stagexl_isometric: ^0.2.0+1

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:stagexl_isometric/stagexl_isometric.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
18
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
84
Overall:
Weighted score of the above. [more]
22
Learn more about scoring.

We analyzed this package on Jul 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: web

Primary library: package:stagexl_isometric/stagexl_isometric.dart with components: html.

Health suggestions

Fix lib/src/display/iso_view.dart. (-14.39 points)

Analysis of lib/src/display/iso_view.dart reported 31 hints, including:

line 3 col 1: Prefer using /// for doc comments.

line 12 col 3: Prefer using /// for doc comments.

line 39 col 3: Prefer using /// for doc comments.

line 48 col 3: Prefer using /// for doc comments.

line 55 col 3: Prefer using /// for doc comments.

Fix lib/src/core/iso_display_object_base.dart. (-13.96 points)

Analysis of lib/src/core/iso_display_object_base.dart reported 30 hints, including:

line 3 col 1: Prefer using /// for doc comments.

line 12 col 3: Prefer using /// for doc comments.

line 25 col 3: Prefer using /// for doc comments.

line 35 col 3: Prefer using /// for doc comments.

line 40 col 3: Prefer using /// for doc comments.

Fix lib/src/data/node_base.dart. (-11.33 points)

Analysis of lib/src/data/node_base.dart reported 24 hints, including:

line 9 col 3: Prefer using /// for doc comments.

line 14 col 3: Prefer using /// for doc comments.

line 23 col 3: Prefer using /// for doc comments.

line 28 col 3: Prefer using /// for doc comments.

line 37 col 3: Prefer using /// for doc comments.

Fix additional 52 files with analysis or formatting issues. (-127.78 points)

Additional issues in the following files:

  • lib/src/display/iso_view_base.dart (17 hints)
  • lib/src/bounds/bounds_base.dart (14 hints)
  • lib/src/display/scene/iso_scene.dart (14 hints)
  • lib/src/events/iso_event.dart (12 hints)
  • lib/src/graphics/bitmap_fill.dart (12 hints)
  • lib/src/display/primitive/iso_primitive_base.dart (11 hints)
  • lib/src/core/iso_container.dart (10 hints)
  • lib/src/graphics/stroke.dart (10 hints)
  • lib/src/display/primitive/iso_polygon.dart (8 hints)
  • lib/src/display/renderers/view_bounds_renderer.dart (8 hints)
  • lib/src/display/scene/iso_grid.dart (8 hints)
  • lib/src/geom/pt.dart (8 hints)
  • lib/src/core/iso_display_object.dart (7 hints)
  • lib/src/data/node.dart (7 hints)
  • lib/src/display/iso_sprite.dart (7 hints)
  • lib/src/display/primitive/iso_rectangle.dart (7 hints)
  • lib/src/core/iso_container_base.dart (6 hints)
  • lib/src/display/scene/iso_origin.dart (6 hints)
  • lib/src/display/primitive/iso_box.dart (5 hints)
  • lib/src/display/scene/iso_scene_base.dart (5 hints)
  • lib/src/graphics/solid_color_fill.dart (5 hints)
  • lib/src/utils/iso_drawing_util.dart (5 hints)
  • lib/src/bounds/scene_bounds.dart (4 hints)
  • lib/src/data/render_data.dart (4 hints)
  • lib/src/display/primitive/iso_hex_box.dart (4 hints)
  • lib/src/display/renderers/default_scene_layout_renderer.dart (4 hints)
  • lib/src/display/renderers/default_shadow_renderer.dart (4 hints)
  • lib/src/display/renderers/default_view_renderer.dart (4 hints)
  • lib/src/errors/iso_error.dart (4 hints)
  • lib/src/graphics/fill_base.dart (4 hints)
  • lib/src/display/primitive/iso_primitive.dart (3 hints)
  • lib/src/display/renderers/scene_layout_renderer_base.dart (3 hints)
  • lib/src/geom/iso_math.dart (3 hints)
  • lib/src/geom/transformations/axonometric_transformation_base.dart (3 hints)
  • lib/src/graphics/bitmap_fill_base.dart (3 hints)
  • lib/src/core/invalidation_base.dart (2 hints)
  • lib/src/display/iso_group.dart (2 hints)
  • lib/src/display/renderers/scene_renderer_base.dart (2 hints)
  • lib/src/display/renderers/simple_scene_layout_renderer.dart (2 hints)
  • lib/src/display/renderers/view_renderer_base.dart (2 hints)
  • lib/src/display/scene/iso_hex_grid.dart (2 hints)
  • lib/src/geom/transformations/default_isometric_transformation.dart (2 hints)
  • lib/src/geom/transformations/dimetric_transformation.dart (2 hints)
  • lib/src/graphics/stroke_base.dart (2 hints)
  • lib/src/bounds/primitive_bounds.dart (1 hint)
  • lib/src/core/class_factory.dart (1 hint)
  • lib/src/geom/transformations/isometric_transformation.dart (1 hint)
  • lib/src/core/factory_base.dart (Run dartfmt to format lib/src/core/factory_base.dart.)
  • lib/src/display/renderers/scene_blitting_renderer.dart (Run dartfmt to format lib/src/display/renderers/scene_blitting_renderer.dart.)
  • lib/src/enum/iso_orientation.dart (Run dartfmt to format lib/src/enum/iso_orientation.dart.)
  • lib/src/enum/render_style_type.dart (Run dartfmt to format lib/src/enum/render_style_type.dart.)
  • lib/stagexl_isometric.dart (Run dartfmt to format lib/stagexl_isometric.dart.)

Maintenance suggestions

The package description is too short. (-16 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.64 <3.0.0
stagexl >=1.4.0 <2.0.0 1.4.0+3
Transitive dependencies
charcode 1.1.2
collection 1.14.11
convert 2.1.1
meta 1.1.7
petitparser 2.4.0
typed_data 1.1.6
xml 3.5.0
Dev dependencies
build_runner any
build_test any
build_web_compilers any

Admin