pixi 4.6.2-0 copy "pixi: ^4.6.2-0" to clipboard
pixi: ^4.6.2-0 copied to clipboard

outdatedDart 1 only

An interop wrapper around the pixijs library.

pixi.dart #

A Dart wrapper for PixiJS.

The version number of this package mirrors that of the PixiJS library it wraps. An official build of minified pixijs is provided as part of the package.

The PixiJS documentation can be used as reference with a few exceptions such as the loading of shaders (see the custom-filter example).

Remember to wrap all callback functions that are passed to JS with allowInterop().

Usage #

import 'dart:html';
import 'package:pixi/pixi.dart';

class BunnyExample
{
	var app		= new Application();
	var bunny	= new Sprite.fromImage('bunny.png');

	BunnyExample()
	{
		document.body.append(app.view);

		this.bunny
			..anchor 	= new Point(0.5, 0.5);
			..position	= new Point(200, 150);

		app.stage.children.add(this.bunny);
		app.ticker.add(allowInterop(
			(_) => this.bunny.rotation += 0.1
		));
	}
}

void main()
{
	new BunnyExample();
}
2
likes
0
pub points
10%
popularity

Publisher

unverified uploader

An interop wrapper around the pixijs library.

Repository
View/report issues

License

unknown (license)

Dependencies

js

More

Packages that depend on pixi