hxpixijs

Externs of Pixi.js for Haxe

Showing:

Popularity

Downloads/wk

24

GitHub Stars

177

Maintenance

Last Commit

1yr ago

Contributors

42

Package

Dependencies

0

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Pixi.js 5 / Haxe 4 Build Status

image

-### Installation

haxelib install pixijs

Issues

Found any bug? Please create a new issue.

Demos

Usage


package basics;

import pixi.core.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() {
        
        var options:ApplicationOptions = {
            width: Browser.window.innerWidth,
            height: Browser.window.innerHeight,
            backgroundColor: 0x006666,
            transparent: true,
            antialias: false,
        };
        
        super(options);
        ticker.add(function(delta){
            _animate(delta);
        });

        _bunny = new Sprite(Texture.from("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);
        Browser.document.body.appendChild(view);
    }

    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

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100