Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #38 from adireddy/develop
Browse files Browse the repository at this point in the history
haxelib release v2.2.6
  • Loading branch information
Adi committed Feb 9, 2015
2 parents b9835e1 + 2795a60 commit fbe7c11
Show file tree
Hide file tree
Showing 19 changed files with 120 additions and 53 deletions.
88 changes: 68 additions & 20 deletions docs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13457,25 +13457,61 @@ Documentation for this class was provided by <a href="https://developer.mozilla.
</f></onUpdate>
<onResize public="1"><f a=""><x path="Void"/></f></onResize>
<_stage set="null"><c path="pixi.display.Stage"/></_stage>
<_canvas><c path="js.html.CanvasElement"/></_canvas>
<_renderer><c path="pixi.renderers.webgl.WebGLRenderer"/></_renderer>
<_stats><c path="pixi.utils.Stats"/></_stats>
<_lastTime><c path="Date"/></_lastTime>
<_currentTime><c path="Date"/></_currentTime>
<_elapsedTime><x path="Float"/></_elapsedTime>
<_skipFrame><x path="Bool"/></_skipFrame>
<_setDefaultValues set="method" line="96"><f a=""><x path="Void"/></f></_setDefaultValues>
<start public="1" set="method" line="106"><f a=""><x path="Void"/></f></start>
<_onWindowResize set="method" line="126"><f a="event">
<c path="js.html.Event"/>
<x path="Void"/>
</f></_onWindowResize>
<_onRequestAnimationFrame set="method" line="135"><f a=""><x path="Void"/></f></_onRequestAnimationFrame>
<_calculateElapsedTime set="method" line="147"><f a=""><x path="Void"/></f></_calculateElapsedTime>
<set_stats set="method" line="153"><f a="val">
<x path="Bool"/>
<x path="Bool"/>
</f></set_stats>
<_canvas>
<c path="js.html.CanvasElement"/>
<meta><m n=":noCompletion"/></meta>
</_canvas>
<_renderer>
<c path="pixi.renderers.IRenderer"/>
<meta><m n=":noCompletion"/></meta>
</_renderer>
<_stats>
<c path="pixi.utils.Stats"/>
<meta><m n=":noCompletion"/></meta>
</_stats>
<_lastTime>
<c path="Date"/>
<meta><m n=":noCompletion"/></meta>
</_lastTime>
<_currentTime>
<c path="Date"/>
<meta><m n=":noCompletion"/></meta>
</_currentTime>
<_elapsedTime>
<x path="Float"/>
<meta><m n=":noCompletion"/></meta>
</_elapsedTime>
<_skipFrame>
<x path="Bool"/>
<meta><m n=":noCompletion"/></meta>
</_skipFrame>
<_setDefaultValues set="method" line="96">
<f a=""><x path="Void"/></f>
<meta><m n=":noCompletion"/></meta>
</_setDefaultValues>
<start public="1" set="method" line="107"><f a=""><x path="Void"/></f></start>
<_onWindowResize set="method" line="127">
<f a="event">
<c path="js.html.Event"/>
<x path="Void"/>
</f>
<meta><m n=":noCompletion"/></meta>
</_onWindowResize>
<_onRequestAnimationFrame set="method" line="136">
<f a=""><x path="Void"/></f>
<meta><m n=":noCompletion"/></meta>
</_onRequestAnimationFrame>
<_calculateElapsedTime set="method" line="148">
<f a=""><x path="Void"/></f>
<meta><m n=":noCompletion"/></meta>
</_calculateElapsedTime>
<set_stats set="method" line="154">
<f a="val">
<x path="Bool"/>
<x path="Bool"/>
</f>
<meta><m n=":noCompletion"/></meta>
</set_stats>
<new public="1" set="method" line="91"><f a=""><x path="Void"/></f></new>
<meta><m n=":keep"/></meta>
</class>
Expand Down Expand Up @@ -17588,7 +17624,19 @@ Documentation for this class was provided by <a href="https://developer.mozilla.
</f></new>
<meta><m n=":native"><e>"PIXI.GraphicsData"</e></m></meta>
</class>
<class path="pixi.renderers.IRenderer" params="" file="pixi/renderers/IRenderer.hx" interface="1"><meta><m n=":keep"/></meta></class>
<class path="pixi.renderers.IRenderer" params="" file="pixi/renderers/IRenderer.hx" interface="1">
<view public="1"><t path="pixi.CanvasElement"/></view>
<render public="1" set="method"><f a="stage">
<c path="pixi.display.Stage"/>
<x path="Void"/>
</f></render>
<resize public="1" set="method"><f a="width:height">
<x path="Float"/>
<x path="Float"/>
<x path="Void"/>
</f></resize>
<meta><m n=":keep"/></meta>
</class>
<class path="pixi.renderers.canvas.CanvasGraphics" params="" file="pixi/renderers/canvas/CanvasGraphics.hx" extern="1">
<renderGraphics public="1" set="method" static="1"><f a="graphics:context">
<c path="pixi.primitives.Graphics"/>
Expand Down
6 changes: 3 additions & 3 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"name": "pixijs",
"license": "MIT",
"tags": ["js","haxe","pixi","extern","web"],
"description": "Externs of pixi.js v2.2.3 for Haxe - JavaScript 2D webGL renderer with canvas fallback.",
"description": "Externs of pixi.js v2.2.5 for Haxe - JavaScript 2D webGL renderer with canvas fallback.",
"contributors": ["adireddy"],
"releasenote": "",
"version": "2.2.5",
"releasenote": "minor bug fixes",
"version": "2.2.6",
"url": "https://github.com/adireddy/haxe-pixi",
"dependencies": {

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pixijs",
"version": "2.2.5",
"version": "2.2.6",
"description": "Externs of pixi.js v2.2.0 for Haxe - JavaScript 2D webGL renderer with canvas fallback.",
"repository": {
"type": "git",
Expand Down
29 changes: 15 additions & 14 deletions pixi/Application.hx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ package pixi;
import js.html.Event;
import js.html.CanvasElement;
import js.Browser;
import pixi.renderers.webgl.WebGLRenderer;
import pixi.utils.Detector;
import pixi.display.Stage;
import pixi.utils.Stats;
import pixi.renderers.IRenderer;

class Application {

Expand Down Expand Up @@ -79,27 +79,28 @@ class Application {
*/
var _stage(default, null):Stage;

var _canvas:CanvasElement;
var _renderer:WebGLRenderer;
var _stats:Stats;
@:noCompletion var _canvas:CanvasElement;
@:noCompletion var _renderer:IRenderer;
@:noCompletion var _stats:Stats;

var _lastTime:Date;
var _currentTime:Date;
var _elapsedTime:Float;
var _skipFrame:Bool;
@:noCompletion var _lastTime:Date;
@:noCompletion var _currentTime:Date;
@:noCompletion var _elapsedTime:Float;
@:noCompletion var _skipFrame:Bool;

public function new() {
_lastTime = Date.now();
_setDefaultValues();
}

function _setDefaultValues() {
@:noCompletion function _setDefaultValues() {
pixelRatio = 1;
skipFrame = false;
stats = false;
backgroundColor = 0xFFFFFF;
width = Browser.window.innerWidth;
height = Browser.window.innerHeight;
resize = true;
_skipFrame = false;
}

Expand All @@ -118,12 +119,12 @@ class Application {

_renderer = Detector.autoDetectRenderer(width, height, renderingOptions);
Browser.document.body.appendChild(_renderer.view);
Browser.window.onresize = _onWindowResize;
if (resize) Browser.window.onresize = _onWindowResize;
Browser.window.requestAnimationFrame(cast _onRequestAnimationFrame);
_lastTime = Date.now();
}

function _onWindowResize(event:Event) {
@:noCompletion function _onWindowResize(event:Event) {
width = Browser.window.innerWidth;
height = Browser.window.innerHeight;
_renderer.resize(width, height);
Expand All @@ -132,7 +133,7 @@ class Application {
if (onResize != null) onResize();
}

function _onRequestAnimationFrame() {
@:noCompletion function _onRequestAnimationFrame() {
if (skipFrame && _skipFrame) _skipFrame = false;
else {
_skipFrame = true;
Expand All @@ -144,13 +145,13 @@ class Application {
if (_stats != null) _stats.update();
}

function _calculateElapsedTime() {
@:noCompletion function _calculateElapsedTime() {
_currentTime = Date.now();
_elapsedTime = _currentTime.getTime() - _lastTime.getTime();
_lastTime = _currentTime;
}

function set_stats(val:Bool):Bool {
@:noCompletion function set_stats(val:Bool):Bool {
if (val) {
var _container = Browser.document.createElement("div");
Browser.document.body.appendChild(_container);
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-basics.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -33,7 +34,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-bitmaptext.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -33,7 +34,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -33,7 +34,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-bunnymark.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -37,7 +38,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-colourmatrix.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -33,7 +34,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-graphics.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -37,7 +38,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-movieclip.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -37,7 +38,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
6 changes: 5 additions & 1 deletion samples/_output/hx-pixi-nape.js
Original file line number Diff line number Diff line change
Expand Up @@ -3379,6 +3379,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -3394,7 +3395,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down Expand Up @@ -3457,6 +3458,9 @@ pixi.display.DisplayObjectContainer.prototype = $extend(PIXI.DisplayObjectContai
pixi.renderers = {};
pixi.renderers.IRenderer = function() { };
pixi.renderers.IRenderer.__name__ = true;
pixi.renderers.IRenderer.prototype = {
__class__: pixi.renderers.IRenderer
};
var samples = {};
samples.nape = {};
samples.nape.Main = function() {
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-particles.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -42,7 +43,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
3 changes: 2 additions & 1 deletion samples/_output/hx-pixi-pixidude.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ pixi.Application.prototype = {
this.backgroundColor = 16777215;
this.width = window.innerWidth;
this.height = window.innerHeight;
this.resize = true;
this._skipFrame = false;
}
,start: function() {
Expand All @@ -33,7 +34,7 @@ pixi.Application.prototype = {
renderingOptions.resolution = this.pixelRatio;
this._renderer = PIXI.autoDetectRenderer(this.width,this.height,renderingOptions);
window.document.body.appendChild(this._renderer.view);
window.onresize = $bind(this,this._onWindowResize);
if(this.resize) window.onresize = $bind(this,this._onWindowResize);
window.requestAnimationFrame($bind(this,this._onRequestAnimationFrame));
this._lastTime = new Date();
}
Expand Down
Loading

0 comments on commit fbe7c11

Please sign in to comment.