dracone 0.1.3

  • Readme
  • Changelog
  • Example
  • Installing
  • 48

dracone

[0.1.3] - Minor fixes #

  • FPS Counter fix

[0.1.2] - Added licence #

[0.1.1] - Minor fixes #

[0.1.0] - Beta #

  • Rive rendering
  • Event system
  • FPS counter
  • Time

[0.0.2] - Sprite rendering, Assets system #

  • Sprite rendering
  • Assets system
  • Assets data cache

[0.0.1] - Initial release #

  • Initial release
  • We can now render squares, yay!

example/lib/main.dart

import 'package:dracone/dracone.dart';
import 'package:dracone/assets.dart';
import 'package:dracone/components.dart';
import 'package:dracone/math.dart' hide Colors;
import 'package:example/test_system.dart';
import 'package:flutter/material.dart' hide Transform;

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Dracone(
      systems: [
        TestSystem(),
      ],
      init: (context, world) {
        world
            .createEntity()
            .withComponent(Transform(
              translation: Vector3(0.0, 0.0, 0.0),
            ))
            .withComponent(
              Rectangle(
                size: Size(180.0, 180.0),
                paint: Paint()..color = Colors.red,
              ),
            )
            .build();

        world
            .createEntity()
            .withComponent(Transform(
              translation: Vector3(-100.0, -400.0, 0.0),
              rotation: Quaternion.axisAngle(Vector3(0.0, 0.0, 1.0), 0.7),
            ))
            .withComponent(
              Camera(
                size: Size(double.infinity, 900.0),
              ),
            )
            .build();
      },
      renderConfig: RenderConfig(
        backgroundColor: Colors.green,
        renderOrderCompareFunction: Comparing.join([
          (command) => command.transform.getTranslation().z,
          (command) => command.transform.getTranslation().y,
          (command) => command.transform.getTranslation().x,
        ]),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

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


dependencies:
  dracone: ^0.1.3

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:dracone/dracone.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.15
  • Flutter: 1.17.5

Analysis suggestions

Package not compatible with SDK dart

Because:

  • dracone that is a package requiring null.

Health issues and suggestions

Document public APIs. (-0.87 points)

230 out of 231 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (fluttershy).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
dartex ^0.1.15 0.1.15
flare_flutter ^2.0.3 2.0.5
flutter 0.0.0
fluttershy ^0.1.4 0.1.4 0.2.0
ordered_set ^2.0.0 2.0.0
Transitive dependencies
collection 1.14.12 1.14.13
flare_dart 2.3.4
meta 1.1.8 1.2.2
sky_engine 0.0.99
typed_data 1.1.6 1.2.0
vector_math 2.0.8 2.1.0-nullsafety
Dev dependencies
flutter_test