stagexl_isometric 0.2.0

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 41

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

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';
  
Version Uploaded Documentation Archive
0.2.0 Aug 17, 2018 Go to the documentation of stagexl_isometric 0.2.0 Download stagexl_isometric 0.2.0 archive
0.1.2 Jun 27, 2017 Go to the documentation of stagexl_isometric 0.1.2 Download stagexl_isometric 0.1.2 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
82
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
84
Overall:
Weighted score of the above. [more]
41
Learn more about scoring.

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

  • Dart: 2.1.0
  • pana: 0.12.13

Platforms

Detected platforms: web

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

Health suggestions

Fix lib/src/graphics/bitmap_fill.dart. (-2.96 points)

Analysis of lib/src/graphics/bitmap_fill.dart reported 6 hints, including:

line 19 col 32: Don't explicitly initialize variables to null.

line 19 col 60: Don't explicitly initialize variables to null.

line 20 col 7: Don't explicitly initialize variables to null.

line 69 col 11: Don't explicitly initialize variables to null.

line 70 col 10: Don't explicitly initialize variables to null.

Fix lib/src/data/node.dart. (-2.48 points)

Analysis of lib/src/data/node.dart reported 5 hints:

line 25 col 10: Don't explicitly initialize variables to null.

line 49 col 11: Don't explicitly initialize variables to null.

line 61 col 11: Don't explicitly initialize variables to null.

line 69 col 12: Don't explicitly initialize variables to null.

line 93 col 11: Use isNotEmpty instead of length

Fix lib/src/display/primitive/iso_box.dart. (-1.49 points)

Analysis of lib/src/display/primitive/iso_box.dart reported 3 hints:

line 11 col 12: Don't explicitly initialize variables to null.

line 150 col 12: Use isNotEmpty instead of length

line 151 col 14: Use isNotEmpty instead of length

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

Additional issues in the following files:

  • lib/src/display/primitive/iso_hex_box.dart (3 hints)
  • lib/src/display/scene/iso_scene.dart (3 hints)
  • lib/src/display/iso_group.dart (2 hints)
  • lib/src/display/primitive/iso_polygon.dart (2 hints)
  • lib/src/display/primitive/iso_primitive.dart (2 hints)
  • lib/src/display/renderers/default_view_renderer.dart (2 hints)
  • lib/src/display/scene/iso_grid.dart (2 hints)
  • lib/src/graphics/solid_color_fill.dart (2 hints)
  • lib/src/core/iso_display_object.dart (1 hint)
  • lib/src/display/iso_sprite.dart (1 hint)
  • lib/src/display/primitive/iso_rectangle.dart (1 hint)
  • lib/src/display/renderers/default_scene_layout_renderer.dart (1 hint)
  • lib/src/display/renderers/simple_scene_layout_renderer.dart (1 hint)
  • lib/src/display/renderers/view_bounds_renderer.dart (1 hint)
  • lib/src/display/scene/iso_hex_grid.dart (1 hint)
  • lib/src/display/scene/iso_origin.dart (1 hint)
  • lib/src/bounds/bounds_base.dart (Run dartfmt to format lib/src/bounds/bounds_base.dart.)
  • lib/src/bounds/primitive_bounds.dart (Run dartfmt to format lib/src/bounds/primitive_bounds.dart.)
  • lib/src/bounds/scene_bounds.dart (Run dartfmt to format lib/src/bounds/scene_bounds.dart.)
  • lib/src/core/class_factory.dart (Run dartfmt to format lib/src/core/class_factory.dart.)
  • lib/src/core/factory_base.dart (Run dartfmt to format lib/src/core/factory_base.dart.)
  • lib/src/core/invalidation_base.dart (Run dartfmt to format lib/src/core/invalidation_base.dart.)
  • lib/src/core/iso_container.dart (Run dartfmt to format lib/src/core/iso_container.dart.)
  • lib/src/core/iso_container_base.dart (Run dartfmt to format lib/src/core/iso_container_base.dart.)
  • lib/src/core/iso_display_object_base.dart (Run dartfmt to format lib/src/core/iso_display_object_base.dart.)
  • lib/src/data/node_base.dart (Run dartfmt to format lib/src/data/node_base.dart.)
  • lib/src/data/render_data.dart (Run dartfmt to format lib/src/data/render_data.dart.)
  • lib/src/display/iso_view.dart (Run dartfmt to format lib/src/display/iso_view.dart.)
  • lib/src/display/iso_view_base.dart (Run dartfmt to format lib/src/display/iso_view_base.dart.)
  • lib/src/display/primitive/iso_primitive_base.dart (Run dartfmt to format lib/src/display/primitive/iso_primitive_base.dart.)
  • lib/src/display/renderers/default_shadow_renderer.dart (Run dartfmt to format lib/src/display/renderers/default_shadow_renderer.dart.)
  • lib/src/display/renderers/scene_blitting_renderer.dart (Run dartfmt to format lib/src/display/renderers/scene_blitting_renderer.dart.)
  • lib/src/display/renderers/scene_layout_renderer_base.dart (Run dartfmt to format lib/src/display/renderers/scene_layout_renderer_base.dart.)
  • lib/src/display/renderers/scene_renderer_base.dart (Run dartfmt to format lib/src/display/renderers/scene_renderer_base.dart.)
  • lib/src/display/renderers/view_renderer_base.dart (Run dartfmt to format lib/src/display/renderers/view_renderer_base.dart.)
  • lib/src/display/scene/iso_scene_base.dart (Run dartfmt to format lib/src/display/scene/iso_scene_base.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/src/errors/iso_error.dart (Run dartfmt to format lib/src/errors/iso_error.dart.)
  • lib/src/events/iso_event.dart (Run dartfmt to format lib/src/events/iso_event.dart.)
  • lib/src/geom/iso_math.dart (Run dartfmt to format lib/src/geom/iso_math.dart.)
  • lib/src/geom/pt.dart (Run dartfmt to format lib/src/geom/pt.dart.)
  • lib/src/geom/transformations/axonometric_transformation_base.dart (Run dartfmt to format lib/src/geom/transformations/axonometric_transformation_base.dart.)
  • lib/src/geom/transformations/default_isometric_transformation.dart (Run dartfmt to format lib/src/geom/transformations/default_isometric_transformation.dart.)
  • lib/src/geom/transformations/dimetric_transformation.dart (Run dartfmt to format lib/src/geom/transformations/dimetric_transformation.dart.)
  • lib/src/geom/transformations/isometric_transformation.dart (Run dartfmt to format lib/src/geom/transformations/isometric_transformation.dart.)
  • lib/src/graphics/bitmap_fill_base.dart (Run dartfmt to format lib/src/graphics/bitmap_fill_base.dart.)
  • lib/src/graphics/fill_base.dart (Run dartfmt to format lib/src/graphics/fill_base.dart.)
  • lib/src/graphics/stroke.dart (Run dartfmt to format lib/src/graphics/stroke.dart.)
  • lib/src/graphics/stroke_base.dart (Run dartfmt to format lib/src/graphics/stroke_base.dart.)
  • lib/src/utils/iso_drawing_util.dart (Run dartfmt to format lib/src/utils/iso_drawing_util.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+2
Transitive dependencies
charcode 1.1.2
collection 1.14.11
convert 2.1.1
petitparser 2.1.1
typed_data 1.1.6
xml 3.3.1
Dev dependencies
build_runner >=0.10.0 <1.0.0
build_test >=0.10.2+5 <1.0.0
build_web_compilers >=0.4.0+4 <1.0.0