A Dart port of pixi.js.
Work in Progress
Implemented so far:
- Canvas renderer
- WebGL renderer (with automatic batching)
- Full scene graph
- Asset loader / sprite sheet loader
- BitmapFont text
- Multiline text
- Primitive drawing
- Interaction (mouse and touch events)
var renderer = new CanvasRenderer(width: 400, height: 300);
var stage = new Stage(new Colour.fromHtml('#6f9'));
var bunny = new Sprite.fromImage("bunny.png");
this.bunny.anchor = new Point(0.5, 0.5);
this.bunny.position = new Point(200, 150);
void _animate(var num)
this.bunny.rotation += 0.1;
- Switched from package js to dart:js for the examples.
- Removed the unittest dependency for now.
- Added a clearEvents method to interactive objects.
- Fixed an issue with colour referencing in the Graphics display object.
- Fixed an issue with interaction states getting missed.
- Added the missing onClick implementation.
Initial release of the interaction implementation:
- It works for mouse and touch events (and should even support multi-touch).
- The appropriate examples have been ported from pixi.js.
- Sprites will have an automatic hit area unless explicitly assigned one.
- Non-sprites should assign a hit area if required.
- A few basic hit shapes are provided (rectangle, circle and polygon).
- Initial interaction manager design.
- Some renaming to avoid clashes with existing Dart classes.
This is a merge of the simple-render branch into the master and includes the following changes:
- Switched to a simpler rendering method by walking the scenegraph instead of maintaining a linked list.
- Removed the linked list sprite batching and implemented a simple batcher with fixed-size buffers.
- Extended the simple batcher with an optional one that supports multiple textures.
- TilingSprite is now derived from Sprite and can be rendered by the batching system so the TilingSprite specific renderer and shader have been deprecated.
- All GL related resources are now owned and maintained by the GL renderer which will make it possible to use them with multiple renderers and will ease the development of context loss management.
- The shaders have been pulled out into separate classes which are derived from a base shader class.
Use this package as a library
1. Depend on it
Add this to your package's pubspec.yaml file:
2. Install it
You can install packages from the command line:
$ pub get
Alternatively, your editor might support
Check the docs for your editor to learn more.
3. Import it
Now in your Dart code, you can use:
||Jan 10, 2018
||Jan 9, 2018
||Sep 13, 2014
||Jul 14, 2014
||Jul 14, 2014
||Jul 11, 2014
||Jul 7, 2014
||Feb 5, 2014
||Nov 14, 2013
||Nov 5, 2013
All 13 versions...
This package version is not analyzed, because it is more than two years old.
Check the latest stable version for its analysis.