Merge pull request #384 from joshtynjala/createjs

CreateJS function signature fixes and intentation consistency
This commit is contained in:
Diullei Gomes
2013-03-08 05:10:20 -08:00
3 changed files with 58 additions and 59 deletions
+2 -1
View File
@@ -567,7 +567,8 @@ module createjs {
export class SpriteSheetUtils {
static addFlippedFrames(spriteSheet: SpriteSheet, horizontal?: bool, vertical?: bool, both?: bool): void;
static extractFrame(spriteSheet: HTMLImageElement, frame: number): HTMLImageElement;
static extractFrame(spriteSheet: SpriteSheet, frame: number): HTMLImageElement;
static extractFrame(spriteSheet: SpriteSheet, animationName: string): HTMLImageElement;
static flip(spriteSheet: HTMLImageElement, flipData: Object): void;
static mergeAlpha(rgbImage: HTMLImageElement, alphaImage: HTMLImageElement, canvas?: HTMLCanvasElement): HTMLCanvasElement;
}
+36 -37
View File
@@ -21,42 +21,42 @@ module createjs {
close(): void;
getItem(value: string): Object;
load(): void;
toString(): string;
toString(): string;
// events
complete: (event: Object) => any;
error: (event: Object) => any;
fileload: (event: Object) => any;
fileprogress: (event: Object) => any;
loadStart: (event: Object) => any;
complete: (event: Object) => any;
error: (event: Object) => any;
fileload: (event: Object) => any;
fileprogress: (event: Object) => any;
loadStart: (event: Object) => any;
// EventDispatcher mixins
addEventListener(type: string, listener: (eventObj: Object) => bool): Function;
addEventListener(type: string, listener: (eventObj: Object) => bool): Object;
removeEventListener(type: string, listener: (eventObj: Function) => bool): void;
removeEventListener(type: string, listener: (eventObj: Object) => bool): void;
removeAllEventListeners(type: string): void;
dispatchEvent(eventObj: string, target: Object): bool;
dispatchEvent(eventObj: Object, target: Object): bool;
hasEventListener(type: string): bool;
// EventDispatcher mixins
addEventListener(type: string, listener: (eventObj: Object) => bool): Function;
addEventListener(type: string, listener: (eventObj: Object) => bool): Object;
removeEventListener(type: string, listener: (eventObj: Function) => bool): void;
removeEventListener(type: string, listener: (eventObj: Object) => bool): void;
removeAllEventListeners(type: string): void;
dispatchEvent(eventObj: string, target: Object): bool;
dispatchEvent(eventObj: Object, target: Object): bool;
hasEventListener(type: string): bool;
}
export class PreloadJS {
version: string;
buildDate: string;
}
export class PreloadJS {
version: string;
buildDate: string;
}
export class LoadQueue extends AbstractLoader {
constructor (useXHR?: bool);
// properties
static BINARY: string;
static BINARY: string;
static CSS: string;
static IMAGE: string;
static JAVASCRIPT: string;
static JSON: string;
static SOUND: string;
static SVG: string;
static SVG: string;
static TEXT: string;
static LOAD_TIMEOUT: number;
static XML: string;
@@ -68,24 +68,23 @@ module createjs {
// methods
BrowserDetect(): Object;
init(useXHR?: bool): void;
init(useXHR?: bool): void;
close(): void;
getResult(value: string): Object;
initialize(useXHR: bool): void;
installPlugin(plugin: () => any): void;
load(): void;
loadFile(file: Object, loadNow: bool): void;
loadFile(file: string, loadNow: bool): void;
loadManifest(manifest: Object[], loadNow: bool): void;
loadManifest(manifest: string[], loadNow: bool): void;
getItem(value: string): Object;
getResult(value: string, rawResult?: bool): Object;
removeAll(): void;
remove(idsOrUrls: string): void;
remove(idsOrUrls: Array): void;
reset(): void;
loadFile(file: Object, loadNow?: bool): void;
loadFile(file: string, loadNow?: bool): void;
loadManifest(manifest: Object[], loadNow?: bool): void;
loadManifest(manifest: string[], loadNow?: bool): void;
getItem(value: string): Object;
getResult(value: string, rawResult?: bool): Object;
removeAll(): void;
remove(idsOrUrls: string): void;
remove(idsOrUrls: Array): void;
reset(): void;
setMaxConnections(value: number): void;
setUseXHR(value: bool): void;
setUseXHR(value: bool): void;
setPaused(value: bool): void;
}
@@ -93,13 +92,13 @@ module createjs {
export class TagLoader extends AbstractLoader {
constructor (item: Object, srcAttr: string, useXHR: bool);
constructor (item: string, srcAttr: string, useXHR: bool);
getResult(): HTMLImageElement;
getResult(): HTMLAudioElement;
getResult(): HTMLImageElement;
getResult(): HTMLAudioElement;
}
export class XHRLoader extends AbstractLoader {
constructor (file: Object);
getResult(rawResult?: bool);
getResult(rawResult?: bool);
}
}
+20 -21
View File
@@ -12,10 +12,10 @@
module createjs {
export class TweenJS {
// properties
version: string;
buildDate: string;
export class TweenJS {
// properties
version: string;
buildDate: string;
}
@@ -120,7 +120,7 @@ module createjs {
// methods
call(callback: (tweenObject: Tween) => any, params?: any[], scope?: Object); // when 'params' isn't given, the callback receives a tweenObject
call(callback: (...params: any[]) => any, params?: any[], scope?: Object); // otherwise, it receives the params only
static get(target, props: Object): Tween;
static get(target, props?: Object, pluginData?: Object, override?: bool): Tween;
static hasActiveTweens(target? ): void;
static installPlugin(plugin: Object, properties: Object): void;
pause(tween: Tween): void;
@@ -137,24 +137,23 @@ module createjs {
// events
change: (event) => any;
// EventDispatcher mixins
addEventListener(type: string, listener: (eventObj: Object) => bool): Function;
addEventListener(type: string, listener: (eventObj: Object) => bool): Object;
removeEventListener(type: string, listener: (eventObj: Function) => bool): void;
removeEventListener(type: string, listener: (eventObj: Object) => bool): void;
removeAllEventListeners(type: string): void;
dispatchEvent(eventObj: string, target: Object): bool;
dispatchEvent(eventObj: Object, target: Object): bool;
hasEventListener(type: string): bool;
// EventDispatcher mixins
addEventListener(type: string, listener: (eventObj: Object) => bool): Function;
addEventListener(type: string, listener: (eventObj: Object) => bool): Object;
removeEventListener(type: string, listener: (eventObj: Function) => bool): void;
removeEventListener(type: string, listener: (eventObj: Object) => bool): void;
removeAllEventListeners(type: string): void;
dispatchEvent(eventObj: string, target: Object): bool;
dispatchEvent(eventObj: Object, target: Object): bool;
hasEventListener(type: string): bool;
}
export class MotionGuidePlugin {
// properties
static priority: number;
export class MotionGuidePlugin {
// properties
static priority: number;
//methods
static install(): Object;
}
//methods
static install(): Object;
}
}