pixijs

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

This is not the latest stable version of pixijs. See version 4.7.1 for the latest version.

To install, run:

haxelib install pixijs 4.2.8 

See using Haxelib in Haxelib documentation for more information.

README.md

Haxelib Version Build Status Issue Count

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)

COHERE - Sample MVC application using Haxe and Pixi.js

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

Usage


package samples.basics;

import pixi.core.display.Container;
import pixi.core.textures.Texture;
import pixi.core.renderers.SystemRenderer;
import pixi.core.renderers.Detector;
import pixi.core.sprites.Sprite;
import js.Browser;

class Main {

	var _bunny:Sprite;
	var _renderer:SystemRenderer;
	var _stage:Container;

	public function new() {
		// Rendering options usage sample
		var options:RenderingOptions = {};
		options.backgroundColor = 0x003366;
		options.resolution = 1;

		_stage = new Container();
		_renderer = Detector.autoDetectRenderer(800, 600, options);

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

		_stage.addChild(_bunny);

		Browser.document.body.appendChild(_renderer.view);
		Browser.window.requestAnimationFrame(cast _animate);
	}

	function _animate() {
		Browser.window.requestAnimationFrame(cast _animate);
		_bunny.rotation += 0.1;
		_renderer.render(_stage);
	}

	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.2.8
Published
1 year 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