Skip to content

Commit

Permalink
Fixed Cross origin loader issue for Pixi and phaser
Browse files Browse the repository at this point in the history
Add EZGUI settings object to set global parameters like crossOrigin
  • Loading branch information
Alaa-eddine committed May 12, 2015
1 parent 2a4e91e commit 2413e3a
Show file tree
Hide file tree
Showing 10 changed files with 1,164 additions and 1,067 deletions.
1 change: 1 addition & 0 deletions EZGUI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
<Content Include="examples\Phaser\index.html" />
<Content Include="examples\Pixi\metalworks.html" />
<Content Include="examples\Pixi\index.html" />
<Content Include="examples\settings\1-crossorigin.html" />
<Content Include="examples\test\index.html" />
<Content Include="js\pixi2.dev.js" />
<Content Include="js\pixi3.dev.js" />
Expand Down
182 changes: 94 additions & 88 deletions dist/EZGUI.d.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,4 @@
/// <reference path="../lib/PIXI.d.ts" />
declare module EZGUI.Compatibility {
var PIXIVersion: number;
var isPhaser: boolean;
var BitmapText: any;
class TilingSprite {
constructor(texture: PIXI.Texture, width: number, height: number);
}
class GUIContainer extends PIXI.DisplayObjectContainer {
}
class GUIDisplayObjectContainer extends GUIContainer {
protected phaserGroup: any;
static phaserGroup: any;
_listeners: any;
constructor();
}
function createRenderTexture(width: any, height: any): any;
}
/// <reference path="../lib/pixi.d.ts" />
declare module EZGUI {
var Easing: {
Linear: {
Expand Down Expand Up @@ -148,24 +131,22 @@ declare module EZGUI.utils {
trigger(event: any, ...args: any[]): void;
}
}
declare module EZGUI {
var VERSION: string;
var tilingRenderer: any;
var dragging: any;
var dsx: number;
var dsy: number;
var startDrag: {
x: any;
y: any;
t: any;
};
var game: any;
var themes: {};
var components: {};
var radioGroups: any;
var EventsHelper: utils.EventHandler;
function registerComponents(cpt: any, id?: any): void;
function create(settings: any, theme: any): any;
declare module EZGUI.Compatibility {
var PIXIVersion: number;
var isPhaser: boolean;
var BitmapText: any;
class TilingSprite {
constructor(texture: PIXI.Texture, width: number, height: number);
}
class GUIContainer extends PIXI.DisplayObjectContainer {
}
class GUIDisplayObjectContainer extends GUIContainer {
protected phaserGroup: any;
static phaserGroup: any;
_listeners: any;
constructor();
}
function createRenderTexture(width: any, height: any): any;
}
declare var Phaser: any;
declare module EZGUI {
Expand Down Expand Up @@ -197,6 +178,31 @@ declare module EZGUI {
applySkin(settings: any): any;
}
}
declare module EZGUI {
var VERSION: string;
var tilingRenderer: any;
var dragging: any;
var dsx: number;
var dsy: number;
var startDrag: {
x: any;
y: any;
t: any;
};
var game: any;
var themes: {};
var components: {};
var radioGroups: any;
var EventsHelper: utils.EventHandler;
/**
* generic settings object
* accepted parameters
* crossOrigin : true/false
*/
var settings: any;
function registerComponents(cpt: any, id?: any): void;
function create(settings: any, theme: any): any;
}
declare module EZGUI {
class MultistateSprite extends PIXI.Sprite {
stateTextures: any;
Expand Down Expand Up @@ -271,114 +277,118 @@ declare module EZGUI {
}
}
declare module EZGUI.Component {
class Button extends GUISprite {
class Label extends GUISprite {
_settings: any;
themeId: any;
constructor(_settings: any, themeId: any);
protected setupEvents(): void;
protected handleEvents(): void;
protected draw(): void;
}
}
declare module EZGUI.Component {
class Checkbox extends Button {
class Slider extends GUISprite {
_settings: any;
themeId: any;
protected _checked: boolean;
protected _checkmark: any;
checked: boolean;
text: string;
value: number;
private slide;
private horizontalSlide;
constructor(_settings: any, themeId: any);
protected setupEvents(): void;
protected drawText(): void;
protected handleEvents(): void;
protected draw(): void;
protected drawText(): void;
}
}
declare module EZGUI.Component {
class Label extends GUISprite {
class Layout extends GUISprite {
_settings: any;
themeId: any;
guiMask: any;
constructor(_settings: any, themeId: any);
protected setupEvents(): void;
protected handleEvents(): void;
protected draw(): void;
createChild(childSettings: any, order?: any): any;
addChildAt(child: any, index: any): PIXI.DisplayObject;
}
}
declare module EZGUI.Component {
class Layout extends GUISprite {
class Window extends Layout {
_settings: any;
themeId: any;
guiMask: any;
private titleBar;
constructor(_settings: any, themeId: any);
protected handleEvents(): void;
protected draw(): void;
createChild(childSettings: any, order?: any): any;
addChildAt(child: any, index: any): PIXI.DisplayObject;
protected handleEvents(): void;
setDraggable(val?: boolean): void;
}
}
declare module EZGUI.Component {
class List extends Layout {
declare module EZGUI.Kit {
class MainScreen extends EZGUI.Component.Window {
_settings: any;
themeId: any;
private decelerationItv;
private decelerationSpeed;
private tween;
private slotSize;
private horizontalSlide;
private buttonsEvents;
constructor(_settings: any, themeId: any);
protected parseSettings(): void;
protected handleEvents(): void;
private decelerateScroll(endPos);
addChildAt(child: any, index: any): PIXI.DisplayObject;
removeChild(child: any): PIXI.DisplayObject;
slideBy(value: any, delay?: any): void;
slideTo(value: any, delay?: any): void;
}
}
declare module EZGUI.utils.ColorParser {
function parseToPixiColor(str: any): any;
function parseToRGB(str: any): any;
}
declare module EZGUI.Component {
class Radio extends Checkbox {
class Button extends GUISprite {
_settings: any;
themeId: any;
group: any;
static groups: any;
checked: boolean;
constructor(_settings: any, themeId: any);
private clearGroup();
protected handleEvents(): void;
protected draw(): void;
}
}
declare module EZGUI.Component {
class Slider extends GUISprite {
class Checkbox extends Button {
_settings: any;
themeId: any;
value: number;
private slide;
private horizontalSlide;
protected _checked: boolean;
protected _checkmark: any;
checked: boolean;
text: string;
constructor(_settings: any, themeId: any);
protected setupEvents(): void;
protected drawText(): void;
protected handleEvents(): void;
protected draw(): void;
protected drawText(): void;
}
}
declare module EZGUI.Component {
class Window extends Layout {
class Radio extends Checkbox {
_settings: any;
themeId: any;
guiMask: any;
private titleBar;
group: any;
static groups: any;
checked: boolean;
constructor(_settings: any, themeId: any);
protected draw(): void;
private clearGroup();
protected handleEvents(): void;
setDraggable(val?: boolean): void;
protected draw(): void;
}
}
declare module EZGUI.Kit {
class MainScreen extends EZGUI.Component.Window {
declare module EZGUI.Component {
class List extends Layout {
_settings: any;
themeId: any;
private buttonsEvents;
private decelerationItv;
private decelerationSpeed;
private tween;
private slotSize;
private horizontalSlide;
constructor(_settings: any, themeId: any);
protected parseSettings(): void;
protected handleEvents(): void;
private decelerateScroll(endPos);
addChildAt(child: any, index: any): PIXI.DisplayObject;
removeChild(child: any): PIXI.DisplayObject;
slideBy(value: any, delay?: any): void;
slideTo(value: any, delay?: any): void;
}
}
declare module EZGUI {
Expand All @@ -389,10 +399,6 @@ declare module EZGUI {
setState(state?: string): void;
}
}
declare module EZGUI.utils.ColorParser {
function parseToPixiColor(str: any): any;
function parseToRGB(str: any): any;
}
declare module EZGUI.utils {
/**
* check if the the point defined by x and y outside a visible gui element
Expand All @@ -410,6 +416,6 @@ declare module EZGUI.utils {
};
function distance(x: any, y: any, x0: any, y0: any): number;
function extendJSON(target: any, source: any): void;
function loadJSON(url: any, cb: any): void;
function loadXML(url: any, cb: any): void;
function loadJSON(url: any, cb: any, crossOrigin?: boolean): void;
function loadXML(url: any, cb: any, crossOrigin?: boolean): void;
}
Loading

0 comments on commit 2413e3a

Please sign in to comment.