pixijs

Externs of pixi.js v4.x for Haxe - JavaScript 2D webGL renderer with canvas fallback.
https://github.com/pixijs/pixi-haxe

To install, run:

haxelib install pixijs 4.7.1 

See using Haxelib in Haxelib documentation for more information.

README.md

Haxelib Version Build Status Support on Patreon

haxe pixi logo

Externs of Pixi.js v4.x for Haxe - A fast and lightweight 2D javascript rendering library that works across all devices.

Installation

haxelib install pixijs

Issues

Found any bug? Please create a new issue.

Demos

Filters (WebGL only)

Filters (pixi-extra-filters) * Glow

COHERE - Sample MVC application using Haxe and Pixi.js

Look at the samples folder for the source code of above examples.

Usage


import pixi.plugins.app.Application;
import pixi.core.graphics.Graphics;
import pixi.core.textures.Texture;
import pixi.core.sprites.Sprite;
import js.Browser;

class Main extends Application {

	var _bunny:Sprite;
	var _graphic:Graphics;

	public function new() {
		super();

		position = Application.POSITION_FIXED;
		width = Browser.window.innerWidth;
		height = Browser.window.innerHeight;
		backgroundColor = 0x006666;
		transparent = true;
		antialias = false;
		onUpdate = _animate;
		super.start();

		_bunny = new Sprite(Texture.fromImage("assets/basics/bunny.png"));
		_bunny.anchor.set(0.5);
		_bunny.position.set(400, 300);

		_graphic = new Graphics();
		_graphic.beginFill(0xFF0000, 0.4);
		_graphic.drawRect(200, 150, 400, 300);
		_graphic.endFill();

		stage.addChild(_graphic);
		stage.addChild(_bunny);
	}

	function _animate(e:Float) {
		_bunny.rotation += 0.1;
	}

	static function main() {
		new Main();
	}
}

Licensing Information

MIT license

This content is released under the MIT License.

Pixi.js is licensed under the MIT License.

Contributor Code of Conduct

Code of Conduct is adapted from Contributor Covenant, version 1.4

Contributors
adireddy
Version
4.7.1
Published
2 months ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github