GithubHelp home page GithubHelp logo

chamberlainpi / pixi-haxe Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pixijs/pixi-haxe

0.0 1.0 0.0 25.19 MB

Externs of pixi.js for Haxe

Home Page: http://www.pixijs.com

License: MIT License

JavaScript 1.61% Haxe 98.39%

pixi-haxe's Introduction

Switch to v2.x.x branch for stable v2 externs

Haxelib Version Build Status Built with Grunt ![Gitter](https://badges.gitter.im/Join Chat.svg)

haxe pixi logo

Externs of pixi.js (v3) for Haxe - 2D webGL renderer with canvas fallback.

Installation

haxelib install pixijs 3.0.0-rc

API Documentation

Documentation - generated with chxdocs

Issues

Found any bug? Please create a new issue.

Demos

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 made by goodboy and licensed under the MIT License.

Contributor Code of Conduct

Code of Conduct is adapted from Contributor Covenant

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.