Externs of pixi.js (v2.2.5) for Haxe - 2D webGL renderer with canvas fallback.
![Gitter](https://badges.gitter.im/Join Chat.svg)
haxelib install pixijs
Click here for API documentation. YUIDoc API similar to pixi.js docs also available.
Found any bug? Please create a new issue.
Ported from pixi.js
- Basics
- Graphics
- Movieclip
- Spritesheet
- Snake
- Spine
- Render Texture
- Pixi Dude
- Bitmap Text
- Tiling Sprite
- Blur (Depth of Field)
- Colour Matrix
New Demos
Look at the samples
folder for the source code of above examples.
package ;
import pixi.renderers.IRenderer;
import pixi.display.Sprite;
import pixi.display.Stage;
import pixi.textures.Texture;
import pixi.utils.Detector;
import js.Browser;
class Main {
var _bunny:Sprite;
var _renderer:IRenderer;
var _stage:Stage;
public function new() {
_stage = new Stage(0x00FF00);
// Rendering options usage sample
var options:RenderingOptions = {};
options.antialias = true;
options.resolution = 1;
options.transparent = true;
_renderer = Detector.autoDetectRenderer(800, 600, options);
Browser.document.body.appendChild(_renderer.view);
_bunny = new Sprite(Texture.fromImage("assets/basics/bunny.png"));
_bunny.anchor.set(0.5, 0.5);
_bunny.scale.set(2, 2);
_bunny.position.set(400, 300);
_stage.addChild(_bunny);
Browser.window.requestAnimationFrame(cast animate);
}
function animate() {
Browser.window.requestAnimationFrame(cast animate);
_bunny.rotation += 0.1;
_renderer.render(_stage);
}
static function main() {
new Main();
}
}
This content is released under the MIT License.
pixi.js is made by goodboy and licensed under the MIT License.
Code of Conduct is adapted from Contributor Covenant