mirror of
https://github.com/photonstorm/phaser
synced 2024-11-25 06:00:41 +00:00
New FXManager system and Camera FX now in place.
This commit is contained in:
parent
c5cccf3283
commit
7d98a1bb9d
325 changed files with 10515 additions and 20564 deletions
28
Phaser/AnimationManager.d.ts
vendored
Normal file
28
Phaser/AnimationManager.d.ts
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
/// <reference path="gameobjects/Sprite.d.ts" />
|
||||
/// <reference path="system/animation/Animation.d.ts" />
|
||||
/// <reference path="system/animation/AnimationLoader.d.ts" />
|
||||
/// <reference path="system/animation/Frame.d.ts" />
|
||||
/// <reference path="system/animation/FrameData.d.ts" />
|
||||
module Phaser {
|
||||
class AnimationManager {
|
||||
constructor(game: Game, parent: Sprite);
|
||||
private _game;
|
||||
private _parent;
|
||||
private _anims;
|
||||
private _frameIndex;
|
||||
private _frameData;
|
||||
public currentAnim: Animation;
|
||||
public currentFrame: Frame;
|
||||
public loadFrameData(frameData: FrameData): void;
|
||||
public add(name: string, frames?: any[], frameRate?: number, loop?: bool, useNumericIndex?: bool): void;
|
||||
private validateFrames(frames, useNumericIndex);
|
||||
public play(name: string, frameRate?: number, loop?: bool): void;
|
||||
public stop(name: string): void;
|
||||
public update(): void;
|
||||
public frameData : FrameData;
|
||||
public frameTotal : number;
|
||||
public frame : number;
|
||||
public frameName : string;
|
||||
}
|
||||
}
|
23
Phaser/Basic.d.ts
vendored
Normal file
23
Phaser/Basic.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class Basic {
|
||||
constructor(game: Game);
|
||||
public _game: Game;
|
||||
public name: string;
|
||||
public ID: number;
|
||||
public isGroup: bool;
|
||||
public exists: bool;
|
||||
public active: bool;
|
||||
public visible: bool;
|
||||
public alive: bool;
|
||||
public ignoreDrawDebug: bool;
|
||||
public destroy(): void;
|
||||
public preUpdate(): void;
|
||||
public update(): void;
|
||||
public postUpdate(): void;
|
||||
public render(camera: Camera, cameraOffsetX: number, cameraOffsetY: number): void;
|
||||
public kill(): void;
|
||||
public revive(): void;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
26
Phaser/Cache.d.ts
vendored
Normal file
26
Phaser/Cache.d.ts
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class Cache {
|
||||
constructor(game: Game);
|
||||
private _game;
|
||||
private _canvases;
|
||||
private _images;
|
||||
private _sounds;
|
||||
private _text;
|
||||
public addCanvas(key: string, canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void;
|
||||
public addSpriteSheet(key: string, url: string, data, frameWidth: number, frameHeight: number, frameMax: number): void;
|
||||
public addTextureAtlas(key: string, url: string, data, jsonData): void;
|
||||
public addImage(key: string, url: string, data): void;
|
||||
public addSound(key: string, url: string, data): void;
|
||||
public decodedSound(key: string, data): void;
|
||||
public addText(key: string, url: string, data): void;
|
||||
public getCanvas(key: string);
|
||||
public getImage(key: string);
|
||||
public getFrameData(key: string): FrameData;
|
||||
public getSound(key: string);
|
||||
public isSoundDecoded(key: string): bool;
|
||||
public isSpriteSheet(key: string): bool;
|
||||
public getText(key: string);
|
||||
public destroy(): void;
|
||||
}
|
||||
}
|
17
Phaser/CameraManager.d.ts
vendored
Normal file
17
Phaser/CameraManager.d.ts
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
/// <reference path="system/Camera.d.ts" />
|
||||
module Phaser {
|
||||
class CameraManager {
|
||||
constructor(game: Game, x: number, y: number, width: number, height: number);
|
||||
private _game;
|
||||
private _cameras;
|
||||
private _cameraInstance;
|
||||
public current: Camera;
|
||||
public getAll(): Camera[];
|
||||
public update(): void;
|
||||
public render(): void;
|
||||
public addCamera(x: number, y: number, width: number, height: number): Camera;
|
||||
public removeCamera(id: number): bool;
|
||||
public destroy(): void;
|
||||
}
|
||||
}
|
53
Phaser/Collision.d.ts
vendored
Normal file
53
Phaser/Collision.d.ts
vendored
Normal file
|
@ -0,0 +1,53 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
/// <reference path="geom/Point.d.ts" />
|
||||
/// <reference path="geom/Rectangle.d.ts" />
|
||||
/// <reference path="geom/Quad.d.ts" />
|
||||
/// <reference path="geom/Circle.d.ts" />
|
||||
/// <reference path="geom/Line.d.ts" />
|
||||
/// <reference path="geom/IntersectResult.d.ts" />
|
||||
/// <reference path="system/QuadTree.d.ts" />
|
||||
module Phaser {
|
||||
class Collision {
|
||||
constructor(game: Game);
|
||||
private _game;
|
||||
static LEFT: number;
|
||||
static RIGHT: number;
|
||||
static UP: number;
|
||||
static DOWN: number;
|
||||
static NONE: number;
|
||||
static CEILING: number;
|
||||
static FLOOR: number;
|
||||
static WALL: number;
|
||||
static ANY: number;
|
||||
static OVERLAP_BIAS: number;
|
||||
static TILE_OVERLAP: bool;
|
||||
static _tempBounds: Quad;
|
||||
static lineToLine(line1: Line, line2: Line, output?: IntersectResult): IntersectResult;
|
||||
static lineToLineSegment(line: Line, seg: Line, output?: IntersectResult): IntersectResult;
|
||||
static lineToRawSegment(line: Line, x1: number, y1: number, x2: number, y2: number, output?: IntersectResult): IntersectResult;
|
||||
static lineToRay(line1: Line, ray: Line, output?: IntersectResult): IntersectResult;
|
||||
static lineToCircle(line: Line, circle: Circle, output?: IntersectResult): IntersectResult;
|
||||
static lineToRectangle(line: Line, rect: Rectangle, output?: IntersectResult): IntersectResult;
|
||||
static lineSegmentToLineSegment(line1: Line, line2: Line, output?: IntersectResult): IntersectResult;
|
||||
static lineSegmentToRay(line: Line, ray: Line, output?: IntersectResult): IntersectResult;
|
||||
static lineSegmentToCircle(seg: Line, circle: Circle, output?: IntersectResult): IntersectResult;
|
||||
static lineSegmentToRectangle(seg: Line, rect: Rectangle, output?: IntersectResult): IntersectResult;
|
||||
static rayToRectangle(ray: Line, rect: Rectangle, output?: IntersectResult): IntersectResult;
|
||||
static rayToLineSegment(rayX1, rayY1, rayX2, rayY2, lineX1, lineY1, lineX2, lineY2, output?: IntersectResult): IntersectResult;
|
||||
static pointToRectangle(point, rect: Rectangle, output?: IntersectResult): IntersectResult;
|
||||
static rectangleToRectangle(rect1: Rectangle, rect2: Rectangle, output?: IntersectResult): IntersectResult;
|
||||
static rectangleToCircle(rect: Rectangle, circle: Circle, output?: IntersectResult): IntersectResult;
|
||||
static circleToCircle(circle1: Circle, circle2: Circle, output?: IntersectResult): IntersectResult;
|
||||
static circleToRectangle(circle: Circle, rect: Rectangle, output?: IntersectResult): IntersectResult;
|
||||
static circleContainsPoint(circle: Circle, point, output?: IntersectResult): IntersectResult;
|
||||
public overlap(object1?: Basic, object2?: Basic, notifyCallback?, processCallback?): bool;
|
||||
static separate(object1, object2): bool;
|
||||
static separateTile(object: GameObject, x: number, y: number, width: number, height: number, mass: number, collideLeft: bool, collideRight: bool, collideUp: bool, collideDown: bool): bool;
|
||||
static separateTileX(object: GameObject, x: number, y: number, width: number, height: number, mass: number, collideLeft: bool, collideRight: bool): bool;
|
||||
static separateTileY(object: GameObject, x: number, y: number, width: number, height: number, mass: number, collideUp: bool, collideDown: bool): bool;
|
||||
static separateX(object1, object2): bool;
|
||||
static separateY(object1, object2): bool;
|
||||
static distance(x1: number, y1: number, x2: number, y2: number): number;
|
||||
static distanceSquared(x1: number, y1: number, x2: number, y2: number): number;
|
||||
}
|
||||
}
|
32
Phaser/DynamicTexture.d.ts
vendored
Normal file
32
Phaser/DynamicTexture.d.ts
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class DynamicTexture {
|
||||
constructor(game: Game, width: number, height: number);
|
||||
private _game;
|
||||
private _sx;
|
||||
private _sy;
|
||||
private _sw;
|
||||
private _sh;
|
||||
private _dx;
|
||||
private _dy;
|
||||
private _dw;
|
||||
private _dh;
|
||||
public bounds: Rectangle;
|
||||
public canvas: HTMLCanvasElement;
|
||||
public context: CanvasRenderingContext2D;
|
||||
public getPixel(x: number, y: number): number;
|
||||
public getPixel32(x: number, y: number): number;
|
||||
public getPixels(rect: Rectangle): ImageData;
|
||||
public setPixel(x: number, y: number, color: number): void;
|
||||
public setPixel32(x: number, y: number, color: number): void;
|
||||
public setPixels(rect: Rectangle, input): void;
|
||||
public fillRect(rect: Rectangle, color: number): void;
|
||||
public pasteImage(key: string, frame?: number, destX?: number, destY?: number, destWidth?: number, destHeight?: number): void;
|
||||
public copyPixels(sourceTexture: DynamicTexture, sourceRect: Rectangle, destPoint: Point): void;
|
||||
public clear(): void;
|
||||
public width : number;
|
||||
public height : number;
|
||||
private getColor32(alpha, red, green, blue);
|
||||
private getColor(red, green, blue);
|
||||
}
|
||||
}
|
18
Phaser/FXManager.d.ts
vendored
Normal file
18
Phaser/FXManager.d.ts
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class FXManager {
|
||||
constructor(game: Game);
|
||||
private _fx;
|
||||
private _length;
|
||||
private _game;
|
||||
public active: bool;
|
||||
public visible: bool;
|
||||
public add(effect): any;
|
||||
public preUpdate(): void;
|
||||
public postUpdate(): void;
|
||||
public preRender(camera: Camera, cameraX: number, cameraY: number, cameraWidth: number, cameraHeight: number): void;
|
||||
public render(camera: Camera, cameraX: number, cameraY: number, cameraWidth: number, cameraHeight: number): void;
|
||||
public postRender(camera: Camera, cameraX: number, cameraY: number, cameraWidth: number, cameraHeight: number): void;
|
||||
public destroy(): void;
|
||||
}
|
||||
}
|
220
Phaser/FXManager.ts
Normal file
220
Phaser/FXManager.ts
Normal file
|
@ -0,0 +1,220 @@
|
|||
/// <reference path="Game.ts" />
|
||||
|
||||
/**
|
||||
* Phaser - FXManager
|
||||
*
|
||||
* The FXManager controls all special effects applied to game objects such as Cameras.
|
||||
*/
|
||||
|
||||
module Phaser {
|
||||
|
||||
export class FXManager {
|
||||
|
||||
constructor(game: Game, parent) {
|
||||
|
||||
this._game = game;
|
||||
this._parent = parent;
|
||||
this._fx = [];
|
||||
|
||||
this.active = true;
|
||||
this.visible = true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* The essential reference to the main game object.
|
||||
*/
|
||||
private _game: Game;
|
||||
|
||||
/**
|
||||
* A reference to the object that owns this FXManager instance.
|
||||
*/
|
||||
private _parent;
|
||||
|
||||
/**
|
||||
* The array in which we keep all of the registered FX
|
||||
*/
|
||||
private _fx;
|
||||
|
||||
/**
|
||||
* Holds the size of the _fx array
|
||||
*/
|
||||
private _length: number;
|
||||
|
||||
/**
|
||||
* Controls whether any of the FX have preUpdate, update or postUpdate called
|
||||
*/
|
||||
public active: bool;
|
||||
|
||||
/**
|
||||
* Controls whether any of the FX have preRender, render or postRender called
|
||||
*/
|
||||
public visible: bool;
|
||||
|
||||
/**
|
||||
* Adds a new FX to the FXManager.
|
||||
* The effect must be an object with at least one of the following methods: preUpdate, postUpdate, preRender, render or postRender.
|
||||
* A new instance of the effect will be created and a reference to Game will be passed to the object constructor.
|
||||
*/
|
||||
public add(effect): any {
|
||||
|
||||
var result: bool = false;
|
||||
var newEffect = { effect: {}, preUpdate: false, postUpdate: false, preRender: false, render: false, postRender: false };
|
||||
|
||||
if (typeof effect === 'function')
|
||||
{
|
||||
newEffect.effect = new effect(this._game, this._parent);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Error("Invalid object given to Phaser.FXManager.add");
|
||||
}
|
||||
|
||||
// Check for methods now to avoid having to do this every loop
|
||||
|
||||
if (typeof newEffect.effect['preUpdate'] === 'function')
|
||||
{
|
||||
newEffect.preUpdate = true;
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (typeof newEffect.effect['postUpdate'] === 'function')
|
||||
{
|
||||
newEffect.postUpdate = true;
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (typeof newEffect.effect['preRender'] === 'function')
|
||||
{
|
||||
newEffect.preRender = true;
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (typeof newEffect.effect['render'] === 'function')
|
||||
{
|
||||
newEffect.render = true;
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (typeof newEffect.effect['postRender'] === 'function')
|
||||
{
|
||||
newEffect.postRender = true;
|
||||
result = true;
|
||||
}
|
||||
|
||||
if (result == true)
|
||||
{
|
||||
this._length = this._fx.push(newEffect);
|
||||
|
||||
return newEffect.effect;
|
||||
}
|
||||
else
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-update is called at the start of the objects update cycle, before any other updates have taken place.
|
||||
*/
|
||||
public preUpdate() {
|
||||
|
||||
if (this.active)
|
||||
{
|
||||
for (var i = 0; i < this._length; i++)
|
||||
{
|
||||
if (this._fx[i].preUpdate)
|
||||
{
|
||||
this._fx[i].effect.preUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Post-update is called at the end of the objects update cycle, after other update logic has taken place.
|
||||
*/
|
||||
public postUpdate() {
|
||||
|
||||
if (this.active)
|
||||
{
|
||||
for (var i = 0; i < this._length; i++)
|
||||
{
|
||||
if (this._fx[i].postUpdate)
|
||||
{
|
||||
this._fx[i].effect.postUpdate();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Pre-render is called at the start of the object render cycle, before any transforms have taken place.
|
||||
* It happens directly AFTER a canvas context.save has happened if added to a Camera.
|
||||
*/
|
||||
public preRender(camera:Camera, cameraX: number, cameraY: number, cameraWidth: number, cameraHeight: number) {
|
||||
|
||||
if (this.visible)
|
||||
{
|
||||
for (var i = 0; i < this._length; i++)
|
||||
{
|
||||
if (this._fx[i].preRender)
|
||||
{
|
||||
this._fx[i].effect.preRender(camera, cameraX, cameraY, cameraWidth, cameraHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* render is called during the objects render cycle, right after all transforms have finished, but before any children/image data is rendered.
|
||||
*/
|
||||
public render(camera:Camera, cameraX: number, cameraY: number, cameraWidth: number, cameraHeight: number) {
|
||||
|
||||
if (this.visible)
|
||||
{
|
||||
for (var i = 0; i < this._length; i++)
|
||||
{
|
||||
if (this._fx[i].preRender)
|
||||
{
|
||||
this._fx[i].effect.preRender(camera, cameraX, cameraY, cameraWidth, cameraHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Post-render is called during the objects render cycle, after the children/image data has been rendered.
|
||||
* It happens directly BEFORE a canvas context.restore has happened if added to a Camera.
|
||||
*/
|
||||
public postRender(camera:Camera, cameraX: number, cameraY: number, cameraWidth: number, cameraHeight: number) {
|
||||
|
||||
if (this.visible)
|
||||
{
|
||||
for (var i = 0; i < this._length; i++)
|
||||
{
|
||||
if (this._fx[i].postRender)
|
||||
{
|
||||
this._fx[i].effect.postRender(camera, cameraX, cameraY, cameraWidth, cameraHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clear down this FXManager and null out references
|
||||
*/
|
||||
public destroy() {
|
||||
this._game = null;
|
||||
this._fx = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
88
Phaser/Game.d.ts
vendored
Normal file
88
Phaser/Game.d.ts
vendored
Normal file
|
@ -0,0 +1,88 @@
|
|||
/// <reference path="AnimationManager.d.ts" />
|
||||
/// <reference path="Basic.d.ts" />
|
||||
/// <reference path="Cache.d.ts" />
|
||||
/// <reference path="CameraManager.d.ts" />
|
||||
/// <reference path="Collision.d.ts" />
|
||||
/// <reference path="DynamicTexture.d.ts" />
|
||||
/// <reference path="FXManager.d.ts" />
|
||||
/// <reference path="GameMath.d.ts" />
|
||||
/// <reference path="Group.d.ts" />
|
||||
/// <reference path="Loader.d.ts" />
|
||||
/// <reference path="Motion.d.ts" />
|
||||
/// <reference path="Signal.d.ts" />
|
||||
/// <reference path="SignalBinding.d.ts" />
|
||||
/// <reference path="SoundManager.d.ts" />
|
||||
/// <reference path="Stage.d.ts" />
|
||||
/// <reference path="Time.d.ts" />
|
||||
/// <reference path="TweenManager.d.ts" />
|
||||
/// <reference path="World.d.ts" />
|
||||
/// <reference path="system/Device.d.ts" />
|
||||
/// <reference path="system/RandomDataGenerator.d.ts" />
|
||||
/// <reference path="system/RequestAnimationFrame.d.ts" />
|
||||
/// <reference path="system/input/Input.d.ts" />
|
||||
/// <reference path="system/input/Keyboard.d.ts" />
|
||||
/// <reference path="system/input/Mouse.d.ts" />
|
||||
/// <reference path="system/input/Touch.d.ts" />
|
||||
/// <reference path="gameobjects/Emitter.d.ts" />
|
||||
/// <reference path="gameobjects/GameObject.d.ts" />
|
||||
/// <reference path="gameobjects/GeomSprite.d.ts" />
|
||||
/// <reference path="gameobjects/Particle.d.ts" />
|
||||
/// <reference path="gameobjects/Sprite.d.ts" />
|
||||
/// <reference path="gameobjects/Tilemap.d.ts" />
|
||||
/// <reference path="gameobjects/ScrollZone.d.ts" />
|
||||
module Phaser {
|
||||
class Game {
|
||||
constructor(callbackContext, parent?: string, width?: number, height?: number, initCallback?, createCallback?, updateCallback?, renderCallback?);
|
||||
private _raf;
|
||||
private _maxAccumulation;
|
||||
private _accumulator;
|
||||
private _step;
|
||||
private _loadComplete;
|
||||
private _paused;
|
||||
private _pendingState;
|
||||
public callbackContext;
|
||||
public onInitCallback;
|
||||
public onCreateCallback;
|
||||
public onUpdateCallback;
|
||||
public onRenderCallback;
|
||||
public onPausedCallback;
|
||||
public cache: Cache;
|
||||
public collision: Collision;
|
||||
public input: Input;
|
||||
public loader: Loader;
|
||||
public math: GameMath;
|
||||
public motion: Motion;
|
||||
public sound: SoundManager;
|
||||
public stage: Stage;
|
||||
public time: Time;
|
||||
public tweens: TweenManager;
|
||||
public world: World;
|
||||
public rnd: RandomDataGenerator;
|
||||
public device: Device;
|
||||
public isBooted: bool;
|
||||
public isRunning: bool;
|
||||
private boot(parent, width, height);
|
||||
private loadComplete();
|
||||
private bootLoop();
|
||||
private pausedLoop();
|
||||
private loop();
|
||||
private startState();
|
||||
public setCallbacks(initCallback?, createCallback?, updateCallback?, renderCallback?): void;
|
||||
public switchState(state, clearWorld?: bool, clearCache?: bool): void;
|
||||
public destroy(): void;
|
||||
public paused : bool;
|
||||
public framerate : number;
|
||||
public createCamera(x: number, y: number, width: number, height: number): Camera;
|
||||
public createGeomSprite(x: number, y: number): GeomSprite;
|
||||
public createSprite(x: number, y: number, key?: string): Sprite;
|
||||
public createDynamicTexture(width: number, height: number): DynamicTexture;
|
||||
public createGroup(MaxSize?: number): Group;
|
||||
public createParticle(): Particle;
|
||||
public createEmitter(x?: number, y?: number, size?: number): Emitter;
|
||||
public createScrollZone(key: string, x?: number, y?: number, width?: number, height?: number): ScrollZone;
|
||||
public createTilemap(key: string, mapData: string, format: number, resizeWorld?: bool, tileWidth?: number, tileHeight?: number): Tilemap;
|
||||
public createTween(obj): Tween;
|
||||
public collide(objectOrGroup1?: Basic, objectOrGroup2?: Basic, notifyCallback?): bool;
|
||||
public camera : Camera;
|
||||
}
|
||||
}
|
|
@ -4,6 +4,7 @@
|
|||
/// <reference path="CameraManager.ts" />
|
||||
/// <reference path="Collision.ts" />
|
||||
/// <reference path="DynamicTexture.ts" />
|
||||
/// <reference path="FXManager.ts" />
|
||||
/// <reference path="GameMath.ts" />
|
||||
/// <reference path="Group.ts" />
|
||||
/// <reference path="Loader.ts" />
|
||||
|
|
110
Phaser/GameMath.d.ts
vendored
Normal file
110
Phaser/GameMath.d.ts
vendored
Normal file
|
@ -0,0 +1,110 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class GameMath {
|
||||
constructor(game: Game);
|
||||
private _game;
|
||||
static PI: number;
|
||||
static PI_2: number;
|
||||
static PI_4: number;
|
||||
static PI_8: number;
|
||||
static PI_16: number;
|
||||
static TWO_PI: number;
|
||||
static THREE_PI_2: number;
|
||||
static E: number;
|
||||
static LN10: number;
|
||||
static LN2: number;
|
||||
static LOG10E: number;
|
||||
static LOG2E: number;
|
||||
static SQRT1_2: number;
|
||||
static SQRT2: number;
|
||||
static DEG_TO_RAD: number;
|
||||
static RAD_TO_DEG: number;
|
||||
static B_16: number;
|
||||
static B_31: number;
|
||||
static B_32: number;
|
||||
static B_48: number;
|
||||
static B_53: number;
|
||||
static B_64: number;
|
||||
static ONE_THIRD: number;
|
||||
static TWO_THIRDS: number;
|
||||
static ONE_SIXTH: number;
|
||||
static COS_PI_3: number;
|
||||
static SIN_2PI_3: number;
|
||||
static CIRCLE_ALPHA: number;
|
||||
static ON: bool;
|
||||
static OFF: bool;
|
||||
static SHORT_EPSILON: number;
|
||||
static PERC_EPSILON: number;
|
||||
static EPSILON: number;
|
||||
static LONG_EPSILON: number;
|
||||
public cosTable: any[];
|
||||
public sinTable: any[];
|
||||
public fuzzyEqual(a: number, b: number, epsilon?: number): bool;
|
||||
public fuzzyLessThan(a: number, b: number, epsilon?: number): bool;
|
||||
public fuzzyGreaterThan(a: number, b: number, epsilon?: number): bool;
|
||||
public fuzzyCeil(val: number, epsilon?: number): number;
|
||||
public fuzzyFloor(val: number, epsilon?: number): number;
|
||||
public average(...args: any[]): number;
|
||||
public slam(value: number, target: number, epsilon?: number): number;
|
||||
public percentageMinMax(val: number, max: number, min?: number): number;
|
||||
public sign(n: number): number;
|
||||
public truncate(n: number): number;
|
||||
public shear(n: number): number;
|
||||
public wrap(val: number, max: number, min?: number): number;
|
||||
public arithWrap(value: number, max: number, min?: number): number;
|
||||
public clamp(input: number, max: number, min?: number): number;
|
||||
public snapTo(input: number, gap: number, start?: number): number;
|
||||
public snapToFloor(input: number, gap: number, start?: number): number;
|
||||
public snapToCeil(input: number, gap: number, start?: number): number;
|
||||
public snapToInArray(input: number, arr: number[], sort?: bool): number;
|
||||
public roundTo(value: number, place?: number, base?: number): number;
|
||||
public floorTo(value: number, place?: number, base?: number): number;
|
||||
public ceilTo(value: number, place?: number, base?: number): number;
|
||||
public interpolateFloat(a: number, b: number, weight: number): number;
|
||||
public radiansToDegrees(angle: number): number;
|
||||
public degreesToRadians(angle: number): number;
|
||||
public angleBetween(x1: number, y1: number, x2: number, y2: number): number;
|
||||
public normalizeAngle(angle: number, radians?: bool): number;
|
||||
public nearestAngleBetween(a1: number, a2: number, radians?: bool): number;
|
||||
public normalizeAngleToAnother(dep: number, ind: number, radians?: bool): number;
|
||||
public normalizeAngleAfterAnother(dep: number, ind: number, radians?: bool): number;
|
||||
public normalizeAngleBeforeAnother(dep: number, ind: number, radians?: bool): number;
|
||||
public interpolateAngles(a1: number, a2: number, weight: number, radians?: bool, ease?): number;
|
||||
public logBaseOf(value: number, base: number): number;
|
||||
public GCD(m: number, n: number): number;
|
||||
public LCM(m: number, n: number): number;
|
||||
public factorial(value: number): number;
|
||||
public gammaFunction(value: number): number;
|
||||
public fallingFactorial(base: number, exp: number): number;
|
||||
public risingFactorial(base: number, exp: number): number;
|
||||
public binCoef(n: number, k: number): number;
|
||||
public risingBinCoef(n: number, k: number): number;
|
||||
public chanceRoll(chance?: number): bool;
|
||||
public maxAdd(value: number, amount: number, max: number): number;
|
||||
public minSub(value: number, amount: number, min: number): number;
|
||||
public wrapValue(value: number, amount: number, max: number): number;
|
||||
public randomSign(): number;
|
||||
public isOdd(n: number): bool;
|
||||
public isEven(n: number): bool;
|
||||
public wrapAngle(angle: number): number;
|
||||
public angleLimit(angle: number, min: number, max: number): number;
|
||||
public linearInterpolation(v, k);
|
||||
public bezierInterpolation(v, k): number;
|
||||
public catmullRomInterpolation(v, k);
|
||||
public linear(p0, p1, t);
|
||||
public bernstein(n, i): number;
|
||||
public catmullRom(p0, p1, p2, p3, t);
|
||||
public difference(a: number, b: number): number;
|
||||
public globalSeed: number;
|
||||
public random(): number;
|
||||
public srand(Seed: number): number;
|
||||
public getRandom(Objects, StartIndex?: number, Length?: number);
|
||||
public floor(Value: number): number;
|
||||
public ceil(Value: number): number;
|
||||
public sinCosGenerator(length: number, sinAmplitude?: number, cosAmplitude?: number, frequency?: number): any[];
|
||||
public shiftSinTable(): number;
|
||||
public shiftCosTable(): number;
|
||||
public vectorLength(dx: number, dy: number): number;
|
||||
public dotProduct(ax: number, ay: number, bx: number, by: number): number;
|
||||
}
|
||||
}
|
39
Phaser/Group.d.ts
vendored
Normal file
39
Phaser/Group.d.ts
vendored
Normal file
|
@ -0,0 +1,39 @@
|
|||
/// <reference path="Basic.d.ts" />
|
||||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class Group extends Basic {
|
||||
constructor(game: Game, MaxSize?: number);
|
||||
static ASCENDING: number;
|
||||
static DESCENDING: number;
|
||||
public members: Basic[];
|
||||
public length: number;
|
||||
private _maxSize;
|
||||
private _marker;
|
||||
private _sortIndex;
|
||||
private _sortOrder;
|
||||
public destroy(): void;
|
||||
public update(): void;
|
||||
public render(camera: Camera, cameraOffsetX: number, cameraOffsetY: number): void;
|
||||
public maxSize : number;
|
||||
public add(Object: Basic): Basic;
|
||||
public recycle(ObjectClass?);
|
||||
public remove(Object: Basic, Splice?: bool): Basic;
|
||||
public replace(OldObject: Basic, NewObject: Basic): Basic;
|
||||
public sort(Index?: string, Order?: number): void;
|
||||
public setAll(VariableName: string, Value: Object, Recurse?: bool): void;
|
||||
public callAll(FunctionName: string, Recurse?: bool): void;
|
||||
public forEach(callback, recursive?: bool): void;
|
||||
public forEachAlive(context, callback, recursive?: bool): void;
|
||||
public getFirstAvailable(ObjectClass?);
|
||||
public getFirstNull(): number;
|
||||
public getFirstExtant(): Basic;
|
||||
public getFirstAlive(): Basic;
|
||||
public getFirstDead(): Basic;
|
||||
public countLiving(): number;
|
||||
public countDead(): number;
|
||||
public getRandom(StartIndex?: number, Length?: number): Basic;
|
||||
public clear(): void;
|
||||
public kill(): void;
|
||||
public sortHandler(Obj1: Basic, Obj2: Basic): number;
|
||||
}
|
||||
}
|
34
Phaser/Loader.d.ts
vendored
Normal file
34
Phaser/Loader.d.ts
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class Loader {
|
||||
constructor(game: Game, callback);
|
||||
private _game;
|
||||
private _keys;
|
||||
private _fileList;
|
||||
private _gameCreateComplete;
|
||||
private _onComplete;
|
||||
private _onFileLoad;
|
||||
private _progressChunk;
|
||||
private _xhr;
|
||||
private _queueSize;
|
||||
public hasLoaded: bool;
|
||||
public progress: number;
|
||||
public reset(): void;
|
||||
public queueSize : number;
|
||||
public addImageFile(key: string, url: string): void;
|
||||
public addSpriteSheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax?: number): void;
|
||||
public addTextureAtlas(key: string, url: string, jsonURL?: string, jsonData?): void;
|
||||
public addAudioFile(key: string, url: string): void;
|
||||
public addTextFile(key: string, url: string): void;
|
||||
public removeFile(key: string): void;
|
||||
public removeAll(): void;
|
||||
public load(onFileLoadCallback?, onCompleteCallback?): void;
|
||||
private loadFile();
|
||||
private fileError(key);
|
||||
private fileComplete(key);
|
||||
private jsonLoadComplete(key);
|
||||
private jsonLoadError(key);
|
||||
private nextFile(previousKey, success);
|
||||
private checkKeyExists(key);
|
||||
}
|
||||
}
|
23
Phaser/Motion.d.ts
vendored
Normal file
23
Phaser/Motion.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
/// <reference path="gameobjects/GameObject.d.ts" />
|
||||
module Phaser {
|
||||
class Motion {
|
||||
constructor(game: Game);
|
||||
private _game;
|
||||
public computeVelocity(Velocity: number, Acceleration?: number, Drag?: number, Max?: number): number;
|
||||
public velocityFromAngle(angle: number, speed: number): Point;
|
||||
public moveTowardsObject(source: GameObject, dest: GameObject, speed?: number, maxTime?: number): void;
|
||||
public accelerateTowardsObject(source: GameObject, dest: GameObject, speed: number, xSpeedMax: number, ySpeedMax: number): void;
|
||||
public moveTowardsMouse(source: GameObject, speed?: number, maxTime?: number): void;
|
||||
public accelerateTowardsMouse(source: GameObject, speed: number, xSpeedMax: number, ySpeedMax: number): void;
|
||||
public moveTowardsPoint(source: GameObject, target: Point, speed?: number, maxTime?: number): void;
|
||||
public accelerateTowardsPoint(source: GameObject, target: Point, speed: number, xSpeedMax: number, ySpeedMax: number): void;
|
||||
public distanceBetween(a: GameObject, b: GameObject): number;
|
||||
public distanceToPoint(a: GameObject, target: Point): number;
|
||||
public distanceToMouse(a: GameObject): number;
|
||||
public angleBetweenPoint(a: GameObject, target: Point, asDegrees?: bool): number;
|
||||
public angleBetween(a: GameObject, b: GameObject, asDegrees?: bool): number;
|
||||
public velocityFromFacing(parent: GameObject, speed: number): Point;
|
||||
public angleBetweenMouse(a: GameObject, asDegrees?: bool): number;
|
||||
}
|
||||
}
|
|
@ -47,12 +47,14 @@
|
|||
<TypeScriptIncludeComments>true</TypeScriptIncludeComments>
|
||||
<TypeScriptSourceMap>false</TypeScriptSourceMap>
|
||||
<TypeScriptOutFile>../build/phaser.js</TypeScriptOutFile>
|
||||
<TypeScriptGeneratesDeclarations>true</TypeScriptGeneratesDeclarations>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
|
||||
<TypeScriptTarget>ES5</TypeScriptTarget>
|
||||
<TypeScriptIncludeComments>false</TypeScriptIncludeComments>
|
||||
<TypeScriptSourceMap>false</TypeScriptSourceMap>
|
||||
<TypeScriptOutFile>../build/phaser.js</TypeScriptOutFile>
|
||||
<TypeScriptGeneratesDeclarations>true</TypeScriptGeneratesDeclarations>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="plugins\" />
|
||||
|
@ -67,6 +69,10 @@
|
|||
<Content Include="DynamicTexture.js">
|
||||
<DependentUpon>DynamicTexture.ts</DependentUpon>
|
||||
</Content>
|
||||
<TypeScriptCompile Include="FXManager.ts" />
|
||||
<Content Include="FXManager.js">
|
||||
<DependentUpon>FXManager.ts</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="Game.js">
|
||||
<DependentUpon>Game.ts</DependentUpon>
|
||||
</Content>
|
||||
|
|
3
Phaser/Phaser.d.ts
vendored
Normal file
3
Phaser/Phaser.d.ts
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
module Phaser {
|
||||
var VERSION: string;
|
||||
}
|
|
@ -7,7 +7,7 @@
|
|||
*
|
||||
* Richard Davey (@photonstorm)
|
||||
*
|
||||
* Many thanks to Adam Saltsman (@ADAMATOMIC) for the original Flixel AS3 code on which Phaser is based.
|
||||
* Many thanks to Adam Saltsman (@ADAMATOMIC) for releasing Flixel on which Phaser took a lot of inspiration.
|
||||
*
|
||||
* "If you want your children to be intelligent, read them fairy tales."
|
||||
* "If you want them to be more intelligent, read them more fairy tales."
|
||||
|
|
26
Phaser/Signal.d.ts
vendored
Normal file
26
Phaser/Signal.d.ts
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
/// <reference path="SignalBinding.d.ts" />
|
||||
module Phaser {
|
||||
class Signal {
|
||||
private _bindings;
|
||||
private _prevParams;
|
||||
static VERSION: string;
|
||||
public memorize: bool;
|
||||
private _shouldPropagate;
|
||||
public active: bool;
|
||||
public validateListener(listener, fnName): void;
|
||||
private _registerListener(listener, isOnce, listenerContext, priority);
|
||||
private _addBinding(binding);
|
||||
private _indexOfListener(listener, context);
|
||||
public has(listener, context?: any): bool;
|
||||
public add(listener, listenerContext?: any, priority?: number): SignalBinding;
|
||||
public addOnce(listener, listenerContext?: any, priority?: number): SignalBinding;
|
||||
public remove(listener, context?: any);
|
||||
public removeAll(): void;
|
||||
public getNumListeners(): number;
|
||||
public halt(): void;
|
||||
public dispatch(...paramsArr: any[]): void;
|
||||
public forget(): void;
|
||||
public dispose(): void;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
21
Phaser/SignalBinding.d.ts
vendored
Normal file
21
Phaser/SignalBinding.d.ts
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
/// <reference path="Signal.d.ts" />
|
||||
module Phaser {
|
||||
class SignalBinding {
|
||||
constructor(signal: Signal, listener, isOnce: bool, listenerContext, priority?: number);
|
||||
private _listener;
|
||||
private _isOnce;
|
||||
public context;
|
||||
private _signal;
|
||||
public priority: number;
|
||||
public active: bool;
|
||||
public params;
|
||||
public execute(paramsArr?: any[]);
|
||||
public detach();
|
||||
public isBound(): bool;
|
||||
public isOnce(): bool;
|
||||
public getListener();
|
||||
public getSignal(): Signal;
|
||||
public _destroy(): void;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
16
Phaser/SoundManager.d.ts
vendored
Normal file
16
Phaser/SoundManager.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
/// <reference path="system/Sound.d.ts" />
|
||||
module Phaser {
|
||||
class SoundManager {
|
||||
constructor(game: Game);
|
||||
private _game;
|
||||
private _context;
|
||||
private _gainNode;
|
||||
private _volume;
|
||||
public mute(): void;
|
||||
public unmute(): void;
|
||||
public volume : number;
|
||||
public decode(key: string, callback?, sound?: Sound): void;
|
||||
public play(key: string, volume?: number, loop?: bool): Sound;
|
||||
}
|
||||
}
|
47
Phaser/Stage.d.ts
vendored
Normal file
47
Phaser/Stage.d.ts
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
/// <reference path="Phaser.d.ts" />
|
||||
/// <reference path="Game.d.ts" />
|
||||
/// <reference path="system/StageScaleMode.d.ts" />
|
||||
/// <reference path="system/screens/BootScreen.d.ts" />
|
||||
/// <reference path="system/screens/PauseScreen.d.ts" />
|
||||
module Phaser {
|
||||
class Stage {
|
||||
constructor(game: Game, parent: string, width: number, height: number);
|
||||
private _game;
|
||||
private _bgColor;
|
||||
private _bootScreen;
|
||||
private _pauseScreen;
|
||||
static ORIENTATION_LANDSCAPE: number;
|
||||
static ORIENTATION_PORTRAIT: number;
|
||||
public bounds: Rectangle;
|
||||
public aspectRatio: number;
|
||||
public clear: bool;
|
||||
public canvas: HTMLCanvasElement;
|
||||
public context: CanvasRenderingContext2D;
|
||||
public disablePauseScreen: bool;
|
||||
public disableBootScreen: bool;
|
||||
public offset: Point;
|
||||
public scale: StageScaleMode;
|
||||
public scaleMode: number;
|
||||
public minScaleX: number;
|
||||
public maxScaleX: number;
|
||||
public minScaleY: number;
|
||||
public maxScaleY: number;
|
||||
public update(): void;
|
||||
private visibilityChange(event);
|
||||
private getOffset(element);
|
||||
public strokeStyle: string;
|
||||
public lineWidth: number;
|
||||
public fillStyle: string;
|
||||
public saveCanvasValues(): void;
|
||||
public restoreCanvasValues(): void;
|
||||
public backgroundColor : string;
|
||||
public x : number;
|
||||
public y : number;
|
||||
public width : number;
|
||||
public height : number;
|
||||
public centerX : number;
|
||||
public centerY : number;
|
||||
public randomX : number;
|
||||
public randomY : number;
|
||||
}
|
||||
}
|
25
Phaser/Time.d.ts
vendored
Normal file
25
Phaser/Time.d.ts
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class Time {
|
||||
constructor(game: Game);
|
||||
private _game;
|
||||
private _started;
|
||||
public timeScale: number;
|
||||
public elapsed: number;
|
||||
public time: number;
|
||||
public now: number;
|
||||
public delta: number;
|
||||
public totalElapsedSeconds : number;
|
||||
public fps: number;
|
||||
public fpsMin: number;
|
||||
public fpsMax: number;
|
||||
public msMin: number;
|
||||
public msMax: number;
|
||||
public frames: number;
|
||||
private _timeLastSecond;
|
||||
public update(): void;
|
||||
public elapsedSince(since: number): number;
|
||||
public elapsedSecondsSince(since: number): number;
|
||||
public reset(): void;
|
||||
}
|
||||
}
|
15
Phaser/TweenManager.d.ts
vendored
Normal file
15
Phaser/TweenManager.d.ts
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
/// <reference path="system/Tween.d.ts" />
|
||||
module Phaser {
|
||||
class TweenManager {
|
||||
constructor(game: Game);
|
||||
private _game;
|
||||
private _tweens;
|
||||
public getAll(): Tween[];
|
||||
public removeAll(): void;
|
||||
public create(object): Tween;
|
||||
public add(tween: Tween): Tween;
|
||||
public remove(tween: Tween): void;
|
||||
public update(): bool;
|
||||
}
|
||||
}
|
32
Phaser/World.d.ts
vendored
Normal file
32
Phaser/World.d.ts
vendored
Normal file
|
@ -0,0 +1,32 @@
|
|||
/// <reference path="Game.d.ts" />
|
||||
module Phaser {
|
||||
class World {
|
||||
constructor(game: Game, width: number, height: number);
|
||||
private _game;
|
||||
public cameras: CameraManager;
|
||||
public group: Group;
|
||||
public bounds: Rectangle;
|
||||
public worldDivisions: number;
|
||||
public update(): void;
|
||||
public render(): void;
|
||||
public destroy(): void;
|
||||
public setSize(width: number, height: number, updateCameraBounds?: bool): void;
|
||||
public width : number;
|
||||
public height : number;
|
||||
public centerX : number;
|
||||
public centerY : number;
|
||||
public randomX : number;
|
||||
public randomY : number;
|
||||
public createCamera(x: number, y: number, width: number, height: number): Camera;
|
||||
public removeCamera(id: number): bool;
|
||||
public getAllCameras(): Camera[];
|
||||
public createSprite(x: number, y: number, key?: string): Sprite;
|
||||
public createGeomSprite(x: number, y: number): GeomSprite;
|
||||
public createDynamicTexture(width: number, height: number): DynamicTexture;
|
||||
public createGroup(MaxSize?: number): Group;
|
||||
public createScrollZone(key: string, x?: number, y?: number, width?: number, height?: number): ScrollZone;
|
||||
public createTilemap(key: string, mapData: string, format: number, resizeWorld?: bool, tileWidth?: number, tileHeight?: number): Tilemap;
|
||||
public createParticle(): Particle;
|
||||
public createEmitter(x?: number, y?: number, size?: number): Emitter;
|
||||
}
|
||||
}
|
38
Phaser/gameobjects/Emitter.d.ts
vendored
Normal file
38
Phaser/gameobjects/Emitter.d.ts
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="../Group.d.ts" />
|
||||
module Phaser {
|
||||
class Emitter extends Group {
|
||||
constructor(game: Game, X?: number, Y?: number, Size?: number);
|
||||
public x: number;
|
||||
public y: number;
|
||||
public width: number;
|
||||
public height: number;
|
||||
public minParticleSpeed: MicroPoint;
|
||||
public maxParticleSpeed: MicroPoint;
|
||||
public particleDrag: MicroPoint;
|
||||
public minRotation: number;
|
||||
public maxRotation: number;
|
||||
public gravity: number;
|
||||
public on: bool;
|
||||
public frequency: number;
|
||||
public lifespan: number;
|
||||
public bounce: number;
|
||||
public particleClass;
|
||||
private _quantity;
|
||||
private _explode;
|
||||
private _timer;
|
||||
private _counter;
|
||||
private _point;
|
||||
public destroy(): void;
|
||||
public makeParticles(Graphics, Quantity?: number, BakedRotations?: number, Multiple?: bool, Collide?: number): Emitter;
|
||||
public update(): void;
|
||||
public kill(): void;
|
||||
public start(Explode?: bool, Lifespan?: number, Frequency?: number, Quantity?: number): void;
|
||||
public emitParticle(): void;
|
||||
public setSize(Width: number, Height: number): void;
|
||||
public setXSpeed(Min?: number, Max?: number): void;
|
||||
public setYSpeed(Min?: number, Max?: number): void;
|
||||
public setRotation(Min?: number, Max?: number): void;
|
||||
public at(Object): void;
|
||||
}
|
||||
}
|
84
Phaser/gameobjects/GameObject.d.ts
vendored
Normal file
84
Phaser/gameobjects/GameObject.d.ts
vendored
Normal file
|
@ -0,0 +1,84 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="../Basic.d.ts" />
|
||||
/// <reference path="../Signal.d.ts" />
|
||||
module Phaser {
|
||||
class GameObject extends Basic {
|
||||
constructor(game: Game, x?: number, y?: number, width?: number, height?: number);
|
||||
private _angle;
|
||||
static ALIGN_TOP_LEFT: number;
|
||||
static ALIGN_TOP_CENTER: number;
|
||||
static ALIGN_TOP_RIGHT: number;
|
||||
static ALIGN_CENTER_LEFT: number;
|
||||
static ALIGN_CENTER: number;
|
||||
static ALIGN_CENTER_RIGHT: number;
|
||||
static ALIGN_BOTTOM_LEFT: number;
|
||||
static ALIGN_BOTTOM_CENTER: number;
|
||||
static ALIGN_BOTTOM_RIGHT: number;
|
||||
static OUT_OF_BOUNDS_STOP: number;
|
||||
static OUT_OF_BOUNDS_KILL: number;
|
||||
public _point: MicroPoint;
|
||||
public cameraBlacklist: number[];
|
||||
public bounds: Rectangle;
|
||||
public worldBounds: Quad;
|
||||
public outOfBoundsAction: number;
|
||||
public align: number;
|
||||
public facing: number;
|
||||
public alpha: number;
|
||||
public scale: MicroPoint;
|
||||
public origin: MicroPoint;
|
||||
public z: number;
|
||||
public rotationOffset: number;
|
||||
public renderRotation: bool;
|
||||
public immovable: bool;
|
||||
public velocity: MicroPoint;
|
||||
public mass: number;
|
||||
public elasticity: number;
|
||||
public acceleration: MicroPoint;
|
||||
public drag: MicroPoint;
|
||||
public maxVelocity: MicroPoint;
|
||||
public angularVelocity: number;
|
||||
public angularAcceleration: number;
|
||||
public angularDrag: number;
|
||||
public maxAngular: number;
|
||||
public scrollFactor: MicroPoint;
|
||||
public health: number;
|
||||
public moves: bool;
|
||||
public touching: number;
|
||||
public wasTouching: number;
|
||||
public allowCollisions: number;
|
||||
public last: MicroPoint;
|
||||
public inputEnabled: bool;
|
||||
private _inputOver;
|
||||
public onInputOver: Signal;
|
||||
public onInputOut: Signal;
|
||||
public onInputDown: Signal;
|
||||
public onInputUp: Signal;
|
||||
public preUpdate(): void;
|
||||
public update(): void;
|
||||
public postUpdate(): void;
|
||||
private updateInput();
|
||||
private updateMotion();
|
||||
public overlaps(ObjectOrGroup, InScreenSpace?: bool, Camera?: Camera): bool;
|
||||
public overlapsAt(X: number, Y: number, ObjectOrGroup, InScreenSpace?: bool, Camera?: Camera): bool;
|
||||
public overlapsPoint(point: Point, InScreenSpace?: bool, Camera?: Camera): bool;
|
||||
public onScreen(Camera?: Camera): bool;
|
||||
public getScreenXY(point?: MicroPoint, Camera?: Camera): MicroPoint;
|
||||
public solid : bool;
|
||||
public getMidpoint(point?: MicroPoint): MicroPoint;
|
||||
public reset(X: number, Y: number): void;
|
||||
public isTouching(Direction: number): bool;
|
||||
public justTouched(Direction: number): bool;
|
||||
public hurt(Damage: number): void;
|
||||
public setBounds(x: number, y: number, width: number, height: number): void;
|
||||
public hideFromCamera(camera: Camera): void;
|
||||
public showToCamera(camera: Camera): void;
|
||||
public clearCameraList(): void;
|
||||
public destroy(): void;
|
||||
public x : number;
|
||||
public y : number;
|
||||
public rotation : number;
|
||||
public angle : number;
|
||||
public width : number;
|
||||
public height : number;
|
||||
}
|
||||
}
|
40
Phaser/gameobjects/GeomSprite.d.ts
vendored
Normal file
40
Phaser/gameobjects/GeomSprite.d.ts
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
module Phaser {
|
||||
class GeomSprite extends GameObject {
|
||||
constructor(game: Game, x?: number, y?: number);
|
||||
private _dx;
|
||||
private _dy;
|
||||
private _dw;
|
||||
private _dh;
|
||||
public type: number;
|
||||
static UNASSIGNED: number;
|
||||
static CIRCLE: number;
|
||||
static LINE: number;
|
||||
static POINT: number;
|
||||
static RECTANGLE: number;
|
||||
public circle: Circle;
|
||||
public line: Line;
|
||||
public point: Point;
|
||||
public rect: Rectangle;
|
||||
public renderOutline: bool;
|
||||
public renderFill: bool;
|
||||
public lineWidth: number;
|
||||
public lineColor: string;
|
||||
public fillColor: string;
|
||||
public loadCircle(circle: Circle): GeomSprite;
|
||||
public loadLine(line: Line): GeomSprite;
|
||||
public loadPoint(point: Point): GeomSprite;
|
||||
public loadRectangle(rect: Rectangle): GeomSprite;
|
||||
public createCircle(diameter: number): GeomSprite;
|
||||
public createLine(x: number, y: number): GeomSprite;
|
||||
public createPoint(): GeomSprite;
|
||||
public createRectangle(width: number, height: number): GeomSprite;
|
||||
public refresh(): void;
|
||||
public update(): void;
|
||||
public inCamera(camera: Rectangle): bool;
|
||||
public render(camera: Camera, cameraOffsetX: number, cameraOffsetY: number): bool;
|
||||
public renderPoint(offsetX, offsetY, point, size): void;
|
||||
public renderDebugInfo(x: number, y: number, color?: string): void;
|
||||
public collide(source: GeomSprite): bool;
|
||||
}
|
||||
}
|
11
Phaser/gameobjects/Particle.d.ts
vendored
Normal file
11
Phaser/gameobjects/Particle.d.ts
vendored
Normal file
|
@ -0,0 +1,11 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="Sprite.d.ts" />
|
||||
module Phaser {
|
||||
class Particle extends Sprite {
|
||||
constructor(game: Game);
|
||||
public lifespan: number;
|
||||
public friction: number;
|
||||
public update(): void;
|
||||
public onEmit(): void;
|
||||
}
|
||||
}
|
22
Phaser/gameobjects/ScrollRegion.d.ts
vendored
Normal file
22
Phaser/gameobjects/ScrollRegion.d.ts
vendored
Normal file
|
@ -0,0 +1,22 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="../geom/Quad.d.ts" />
|
||||
module Phaser {
|
||||
class ScrollRegion {
|
||||
constructor(x: number, y: number, width: number, height: number, speedX: number, speedY: number);
|
||||
private _A;
|
||||
private _B;
|
||||
private _C;
|
||||
private _D;
|
||||
private _bounds;
|
||||
private _scroll;
|
||||
private _anchorWidth;
|
||||
private _anchorHeight;
|
||||
private _inverseWidth;
|
||||
private _inverseHeight;
|
||||
public visible: bool;
|
||||
public scrollSpeed: MicroPoint;
|
||||
public update(delta: number): void;
|
||||
public render(context: CanvasRenderingContext2D, texture, dx: number, dy: number, dw: number, dh: number): void;
|
||||
private crop(context, texture, srcX, srcY, srcW, srcH, destX, destY, destW, destH, offsetX, offsetY);
|
||||
}
|
||||
}
|
23
Phaser/gameobjects/ScrollZone.d.ts
vendored
Normal file
23
Phaser/gameobjects/ScrollZone.d.ts
vendored
Normal file
|
@ -0,0 +1,23 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="../geom/Quad.d.ts" />
|
||||
/// <reference path="ScrollRegion.d.ts" />
|
||||
module Phaser {
|
||||
class ScrollZone extends GameObject {
|
||||
constructor(game: Game, key: string, x?: number, y?: number, width?: number, height?: number);
|
||||
private _texture;
|
||||
private _dynamicTexture;
|
||||
private _dx;
|
||||
private _dy;
|
||||
private _dw;
|
||||
private _dh;
|
||||
public currentRegion: ScrollRegion;
|
||||
public regions: ScrollRegion[];
|
||||
public flipped: bool;
|
||||
public addRegion(x: number, y: number, width: number, height: number, speedX?: number, speedY?: number): ScrollRegion;
|
||||
public setSpeed(x: number, y: number): ScrollZone;
|
||||
public update(): void;
|
||||
public inCamera(camera: Rectangle): bool;
|
||||
public render(camera: Camera, cameraOffsetX: number, cameraOffsetY: number): bool;
|
||||
private createRepeatingTexture(regionWidth, regionHeight);
|
||||
}
|
||||
}
|
34
Phaser/gameobjects/Sprite.d.ts
vendored
Normal file
34
Phaser/gameobjects/Sprite.d.ts
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="../AnimationManager.d.ts" />
|
||||
/// <reference path="GameObject.d.ts" />
|
||||
/// <reference path="../system/Camera.d.ts" />
|
||||
module Phaser {
|
||||
class Sprite extends GameObject {
|
||||
constructor(game: Game, x?: number, y?: number, key?: string);
|
||||
private _texture;
|
||||
private _dynamicTexture;
|
||||
private _sx;
|
||||
private _sy;
|
||||
private _sw;
|
||||
private _sh;
|
||||
private _dx;
|
||||
private _dy;
|
||||
private _dw;
|
||||
private _dh;
|
||||
public animations: AnimationManager;
|
||||
public renderDebug: bool;
|
||||
public renderDebugColor: string;
|
||||
public renderDebugPointColor: string;
|
||||
public flipped: bool;
|
||||
public loadGraphic(key: string): Sprite;
|
||||
public loadDynamicTexture(texture: DynamicTexture): Sprite;
|
||||
public makeGraphic(width: number, height: number, color?: number): Sprite;
|
||||
public inCamera(camera: Rectangle): bool;
|
||||
public postUpdate(): void;
|
||||
public frame : number;
|
||||
public frameName : string;
|
||||
public render(camera: Camera, cameraOffsetX: number, cameraOffsetY: number): bool;
|
||||
private renderBounds(camera, cameraOffsetX, cameraOffsetY);
|
||||
public renderDebugInfo(x: number, y: number, color?: string): void;
|
||||
}
|
||||
}
|
31
Phaser/gameobjects/Tilemap.d.ts
vendored
Normal file
31
Phaser/gameobjects/Tilemap.d.ts
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="GameObject.d.ts" />
|
||||
/// <reference path="../system/TilemapLayer.d.ts" />
|
||||
/// <reference path="../system/Tile.d.ts" />
|
||||
module Phaser {
|
||||
class Tilemap extends GameObject {
|
||||
constructor(game: Game, key: string, mapData: string, format: number, resizeWorld?: bool, tileWidth?: number, tileHeight?: number);
|
||||
static FORMAT_CSV: number;
|
||||
static FORMAT_TILED_JSON: number;
|
||||
public tiles: Tile[];
|
||||
public layers: TilemapLayer[];
|
||||
public currentLayer: TilemapLayer;
|
||||
public collisionLayer: TilemapLayer;
|
||||
public mapFormat: number;
|
||||
public update(): void;
|
||||
public render(camera: Camera, cameraOffsetX: number, cameraOffsetY: number): void;
|
||||
private parseCSV(data, key, tileWidth, tileHeight);
|
||||
private parseTiledJSON(data, key);
|
||||
private generateTiles(qty);
|
||||
public widthInPixels : number;
|
||||
public heightInPixels : number;
|
||||
public setCollisionRange(start: number, end: number, collision?: number, resetCollisions?: bool): void;
|
||||
public setCollisionByIndex(values: number[], collision?: number, resetCollisions?: bool): void;
|
||||
public getTile(x: number, y: number, layer?: number): Tile;
|
||||
public getTileFromWorldXY(x: number, y: number, layer?: number): Tile;
|
||||
public getTileFromInputXY(layer?: number): Tile;
|
||||
public getTileOverlaps(object: GameObject): bool;
|
||||
public collide(objectOrGroup?, callback?): bool;
|
||||
public collideGameObject(object: GameObject): bool;
|
||||
}
|
||||
}
|
34
Phaser/geom/Circle.d.ts
vendored
Normal file
34
Phaser/geom/Circle.d.ts
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
module Phaser {
|
||||
class Circle {
|
||||
constructor(x?: number, y?: number, diameter?: number);
|
||||
private _diameter;
|
||||
private _radius;
|
||||
public x: number;
|
||||
public y: number;
|
||||
public diameter : number;
|
||||
public radius : number;
|
||||
public circumference(): number;
|
||||
public bottom : number;
|
||||
public left : number;
|
||||
public right : number;
|
||||
public top : number;
|
||||
public area : number;
|
||||
public isEmpty : bool;
|
||||
public intersectCircleLine(line: Line): bool;
|
||||
public clone(output?: Circle): Circle;
|
||||
public contains(x: number, y: number): bool;
|
||||
public containsPoint(point: Point): bool;
|
||||
public containsCircle(circle: Circle): bool;
|
||||
public copyFrom(source: Circle): Circle;
|
||||
public copyTo(target: Circle): Circle;
|
||||
public distanceTo(target: any, round?: bool): number;
|
||||
public equals(toCompare: Circle): bool;
|
||||
public intersects(toIntersect: Circle): bool;
|
||||
public circumferencePoint(angle: number, asDegrees?: bool, output?: Point): Point;
|
||||
public offset(dx: number, dy: number): Circle;
|
||||
public offsetPoint(point: Point): Circle;
|
||||
public setTo(x: number, y: number, diameter: number): Circle;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
15
Phaser/geom/IntersectResult.d.ts
vendored
Normal file
15
Phaser/geom/IntersectResult.d.ts
vendored
Normal file
|
@ -0,0 +1,15 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
module Phaser {
|
||||
class IntersectResult {
|
||||
public result: bool;
|
||||
public x: number;
|
||||
public y: number;
|
||||
public x1: number;
|
||||
public y1: number;
|
||||
public x2: number;
|
||||
public y2: number;
|
||||
public width: number;
|
||||
public height: number;
|
||||
public setTo(x1: number, y1: number, x2?: number, y2?: number, width?: number, height?: number): void;
|
||||
}
|
||||
}
|
27
Phaser/geom/Line.d.ts
vendored
Normal file
27
Phaser/geom/Line.d.ts
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
module Phaser {
|
||||
class Line {
|
||||
constructor(x1?: number, y1?: number, x2?: number, y2?: number);
|
||||
public x1: number;
|
||||
public y1: number;
|
||||
public x2: number;
|
||||
public y2: number;
|
||||
public clone(output?: Line): Line;
|
||||
public copyFrom(source: Line): Line;
|
||||
public copyTo(target: Line): Line;
|
||||
public setTo(x1?: number, y1?: number, x2?: number, y2?: number): Line;
|
||||
public width : number;
|
||||
public height : number;
|
||||
public length : number;
|
||||
public getY(x: number): number;
|
||||
public angle : number;
|
||||
public slope : number;
|
||||
public perpSlope : number;
|
||||
public yIntercept : number;
|
||||
public isPointOnLine(x: number, y: number): bool;
|
||||
public isPointOnLineSegment(x: number, y: number): bool;
|
||||
public intersectLineLine(line): any;
|
||||
public perp(x: number, y: number, output?: Line): Line;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
16
Phaser/geom/MicroPoint.d.ts
vendored
Normal file
16
Phaser/geom/MicroPoint.d.ts
vendored
Normal file
|
@ -0,0 +1,16 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
module Phaser {
|
||||
class MicroPoint {
|
||||
constructor(x?: number, y?: number, parent?: any);
|
||||
private _x;
|
||||
private _y;
|
||||
public parent: any;
|
||||
public x : number;
|
||||
public y : number;
|
||||
public copyFrom(source: any): MicroPoint;
|
||||
public copyTo(target: any): MicroPoint;
|
||||
public setTo(x: number, y: number, callParent?: bool): MicroPoint;
|
||||
public equals(toCompare): bool;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
28
Phaser/geom/Point.d.ts
vendored
Normal file
28
Phaser/geom/Point.d.ts
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
module Phaser {
|
||||
class Point {
|
||||
constructor(x?: number, y?: number);
|
||||
public x: number;
|
||||
public y: number;
|
||||
public add(toAdd: Point, output?: Point): Point;
|
||||
public addTo(x?: number, y?: number): Point;
|
||||
public subtractFrom(x?: number, y?: number): Point;
|
||||
public invert(): Point;
|
||||
public clamp(min: number, max: number): Point;
|
||||
public clampX(min: number, max: number): Point;
|
||||
public clampY(min: number, max: number): Point;
|
||||
public clone(output?: Point): Point;
|
||||
public copyFrom(source: Point): Point;
|
||||
public copyTo(target: Point): Point;
|
||||
public distanceTo(target: Point, round?: bool): number;
|
||||
static distanceBetween(pointA: Point, pointB: Point, round?: bool): number;
|
||||
public distanceCompare(target: Point, distance: number): bool;
|
||||
public equals(toCompare: Point): bool;
|
||||
public interpolate(pointA, pointB, f): void;
|
||||
public offset(dx: number, dy: number): Point;
|
||||
public polar(length, angle): void;
|
||||
public setTo(x: number, y: number): Point;
|
||||
public subtract(point: Point, output?: Point): Point;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
19
Phaser/geom/Quad.d.ts
vendored
Normal file
19
Phaser/geom/Quad.d.ts
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
module Phaser {
|
||||
class Quad {
|
||||
constructor(x?: number, y?: number, width?: number, height?: number);
|
||||
public x: number;
|
||||
public y: number;
|
||||
public width: number;
|
||||
public height: number;
|
||||
public setTo(x: number, y: number, width: number, height: number): Quad;
|
||||
public left : number;
|
||||
public right : number;
|
||||
public top : number;
|
||||
public bottom : number;
|
||||
public halfWidth : number;
|
||||
public halfHeight : number;
|
||||
public intersects(q, t?: number): bool;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
57
Phaser/geom/Rectangle.d.ts
vendored
Normal file
57
Phaser/geom/Rectangle.d.ts
vendored
Normal file
|
@ -0,0 +1,57 @@
|
|||
/// <reference path="../Game.d.ts" />
|
||||
/// <reference path="MicroPoint.d.ts" />
|
||||
module Phaser {
|
||||
class Rectangle {
|
||||
constructor(x?: number, y?: number, width?: number, height?: number);
|
||||
private _tempX;
|
||||
private _tempY;
|
||||
private _tempWidth;
|
||||
private _tempHeight;
|
||||
public x : number;
|
||||
public y : number;
|
||||
public topLeft: MicroPoint;
|
||||
public topCenter: MicroPoint;
|
||||
public topRight: MicroPoint;
|
||||
public leftCenter: MicroPoint;
|
||||
public center: MicroPoint;
|
||||
public rightCenter: MicroPoint;
|
||||
public bottomLeft: MicroPoint;
|
||||
public bottomCenter: MicroPoint;
|
||||
public bottomRight: MicroPoint;
|
||||
private _width;
|
||||
private _height;
|
||||
private _halfWidth;
|
||||
private _halfHeight;
|
||||
public length: number;
|
||||
public updateBounds(): void;
|
||||
public width : number;
|
||||
public height : number;
|
||||
public halfWidth : number;
|
||||
public halfHeight : number;
|
||||
public bottom : number;
|
||||
public left : number;
|
||||
public right : number;
|
||||
public size(output?: Point): Point;
|
||||
public volume : number;
|
||||
public perimeter : number;
|
||||
public top : number;
|
||||
public clone(output?: Rectangle): Rectangle;
|
||||
public contains(x: number, y: number): bool;
|
||||
public containsPoint(point: any): bool;
|
||||
public containsRect(rect: Rectangle): bool;
|
||||
public copyFrom(source: Rectangle): Rectangle;
|
||||
public copyTo(target: Rectangle): Rectangle;
|
||||
public equals(toCompare: Rectangle): bool;
|
||||
public inflate(dx: number, dy: number): Rectangle;
|
||||
public inflatePoint(point: Point): Rectangle;
|
||||
public intersection(toIntersect: Rectangle, output?: Rectangle): Rectangle;
|
||||
public intersects(r2: Rectangle, t?: number): bool;
|
||||
public isEmpty : bool;
|
||||
public offset(dx: number, dy: number): Rectangle;
|
||||
public offsetPoint(point: Point): Rectangle;
|
||||
public setEmpty(): Rectangle;
|
||||
public setTo(x: number, y: number, width: number, height: number): Rectangle;
|
||||
public union(toUnion: Rectangle, output?: Rectangle): Rectangle;
|
||||
public toString(): string;
|
||||
}
|
||||
}
|
3
Phaser/node_modules/grunt/.npmignore
generated
vendored
3
Phaser/node_modules/grunt/.npmignore
generated
vendored
|
@ -1,3 +0,0 @@
|
|||
node_modules
|
||||
.npm-debug.log
|
||||
tmp
|
5
Phaser/node_modules/grunt/.travis.yml
generated
vendored
5
Phaser/node_modules/grunt/.travis.yml
generated
vendored
|
@ -1,5 +0,0 @@
|
|||
language: node_js
|
||||
node_js:
|
||||
- 0.8
|
||||
before_script:
|
||||
- npm install -g grunt-cli
|
4
Phaser/node_modules/grunt/AUTHORS
generated
vendored
4
Phaser/node_modules/grunt/AUTHORS
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
"Cowboy" Ben Alman (http://benalman.com/)
|
||||
Kyle Robinson Young (http://dontkry.com/)
|
||||
Tyler Kellen (http://goingslowly.com)
|
||||
Sindre Sorhus (http://sindresorhus.com)
|
23
Phaser/node_modules/grunt/CHANGELOG
generated
vendored
23
Phaser/node_modules/grunt/CHANGELOG
generated
vendored
|
@ -1,23 +0,0 @@
|
|||
v0.4.1:
|
||||
date: 2013-03-13
|
||||
changes:
|
||||
- Fix path.join thrown errors with expandMapping rename. Closes gh-725.
|
||||
- Update copyright date to 2013. Closes gh-660.
|
||||
- Remove some side effects from manually requiring Grunt. Closes gh-605.
|
||||
- grunt.log: add formatting support and implicitly cast msg to a string. Closes gh-703.
|
||||
- Update js-yaml to version 2. Closes gh-683.
|
||||
- The grunt.util.spawn method now falls back to stdout when the `grunt` option is set. Closes gh-691.
|
||||
- Making --verbose "Files:" warnings less scary. Closes gh-657.
|
||||
- Fixing typo: the grunt.fatal method now defaults to FATAL_ERROR. Closes gh-656, gh-707.
|
||||
- Removed a duplicate line. Closes gh-702.
|
||||
- Gruntfile name should no longer be case sensitive. Closes gh-685.
|
||||
- The grunt.file.delete method warns and returns false if file doesn't exist. Closes gh-635, gh-714.
|
||||
- The grunt.package property is now resolved via require(). Closes gh-704.
|
||||
- The grunt.util.spawn method no longer breaks on multibyte stdio. Closes gh-710.
|
||||
- Fix "path.join arguments must be strings" error in file.expand/recurse when options.cwd is not set. Closes gh-722.
|
||||
- Adding a fairly relevant keyword to package.json (task).
|
||||
v0.4.0:
|
||||
date: 2013-02-18
|
||||
changes:
|
||||
- Initial release of 0.4.0.
|
||||
- See http://gruntjs.com/upgrading-from-0.3-to-0.4 for a list of changes / migration guide.
|
1
Phaser/node_modules/grunt/CONTRIBUTING.md
generated
vendored
1
Phaser/node_modules/grunt/CONTRIBUTING.md
generated
vendored
|
@ -1 +0,0 @@
|
|||
Please see the [Contributing to grunt](http://gruntjs.com/contributing) guide for information on contributing to this project.
|
22
Phaser/node_modules/grunt/LICENSE-MIT
generated
vendored
22
Phaser/node_modules/grunt/LICENSE-MIT
generated
vendored
|
@ -1,22 +0,0 @@
|
|||
Copyright (c) 2013 "Cowboy" Ben Alman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
13
Phaser/node_modules/grunt/README.md
generated
vendored
13
Phaser/node_modules/grunt/README.md
generated
vendored
|
@ -1,13 +0,0 @@
|
|||
# Grunt: The JavaScript Task Runner [![Build Status](https://secure.travis-ci.org/gruntjs/grunt.png?branch=master)](http://travis-ci.org/gruntjs/grunt)
|
||||
|
||||
### Documentation
|
||||
|
||||
Visit the [gruntjs.com](http://gruntjs.com/) website for all the things.
|
||||
|
||||
### Support / Contributing
|
||||
Before you make an issue, please read our [Contributing](http://gruntjs.com/contributing) guide.
|
||||
|
||||
You can find the grunt team in [#grunt on irc.freenode.net](irc://irc.freenode.net/#grunt).
|
||||
|
||||
### Release History
|
||||
See the [CHANGELOG](CHANGELOG).
|
1
Phaser/node_modules/grunt/docs/README.md
generated
vendored
1
Phaser/node_modules/grunt/docs/README.md
generated
vendored
|
@ -1 +0,0 @@
|
|||
Visit the [gruntjs.com](http://gruntjs.com/) website for all the things.
|
1
Phaser/node_modules/grunt/node_modules/.bin/cake
generated
vendored
1
Phaser/node_modules/grunt/node_modules/.bin/cake
generated
vendored
|
@ -1 +0,0 @@
|
|||
../coffee-script/bin/cake
|
1
Phaser/node_modules/grunt/node_modules/.bin/coffee
generated
vendored
1
Phaser/node_modules/grunt/node_modules/.bin/coffee
generated
vendored
|
@ -1 +0,0 @@
|
|||
../coffee-script/bin/coffee
|
1
Phaser/node_modules/grunt/node_modules/.bin/js-yaml
generated
vendored
1
Phaser/node_modules/grunt/node_modules/.bin/js-yaml
generated
vendored
|
@ -1 +0,0 @@
|
|||
../js-yaml/bin/js-yaml.js
|
1
Phaser/node_modules/grunt/node_modules/.bin/lodash
generated
vendored
1
Phaser/node_modules/grunt/node_modules/.bin/lodash
generated
vendored
|
@ -1 +0,0 @@
|
|||
../lodash/build.js
|
1
Phaser/node_modules/grunt/node_modules/.bin/nopt
generated
vendored
1
Phaser/node_modules/grunt/node_modules/.bin/nopt
generated
vendored
|
@ -1 +0,0 @@
|
|||
../nopt/bin/nopt.js
|
1
Phaser/node_modules/grunt/node_modules/.bin/which
generated
vendored
1
Phaser/node_modules/grunt/node_modules/.bin/which
generated
vendored
|
@ -1 +0,0 @@
|
|||
../which/bin/which
|
9
Phaser/node_modules/grunt/node_modules/async/.gitmodules
generated
vendored
9
Phaser/node_modules/grunt/node_modules/async/.gitmodules
generated
vendored
|
@ -1,9 +0,0 @@
|
|||
[submodule "deps/nodeunit"]
|
||||
path = deps/nodeunit
|
||||
url = git://github.com/caolan/nodeunit.git
|
||||
[submodule "deps/UglifyJS"]
|
||||
path = deps/UglifyJS
|
||||
url = https://github.com/mishoo/UglifyJS.git
|
||||
[submodule "deps/nodelint"]
|
||||
path = deps/nodelint
|
||||
url = https://github.com/tav/nodelint.git
|
4
Phaser/node_modules/grunt/node_modules/async/.npmignore
generated
vendored
4
Phaser/node_modules/grunt/node_modules/async/.npmignore
generated
vendored
|
@ -1,4 +0,0 @@
|
|||
deps
|
||||
dist
|
||||
test
|
||||
nodelint.cfg
|
19
Phaser/node_modules/grunt/node_modules/async/LICENSE
generated
vendored
19
Phaser/node_modules/grunt/node_modules/async/LICENSE
generated
vendored
|
@ -1,19 +0,0 @@
|
|||
Copyright (c) 2010 Caolan McMahon
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
25
Phaser/node_modules/grunt/node_modules/async/Makefile
generated
vendored
25
Phaser/node_modules/grunt/node_modules/async/Makefile
generated
vendored
|
@ -1,25 +0,0 @@
|
|||
PACKAGE = asyncjs
|
||||
NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node)
|
||||
CWD := $(shell pwd)
|
||||
NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit
|
||||
UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs
|
||||
NODELINT = $(CWD)/node_modules/nodelint/nodelint
|
||||
|
||||
BUILDDIR = dist
|
||||
|
||||
all: clean test build
|
||||
|
||||
build: $(wildcard lib/*.js)
|
||||
mkdir -p $(BUILDDIR)
|
||||
$(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js
|
||||
|
||||
test:
|
||||
$(NODEUNIT) test
|
||||
|
||||
clean:
|
||||
rm -rf $(BUILDDIR)
|
||||
|
||||
lint:
|
||||
$(NODELINT) --config nodelint.cfg lib/async.js
|
||||
|
||||
.PHONY: test build all
|
1021
Phaser/node_modules/grunt/node_modules/async/README.md
generated
vendored
1021
Phaser/node_modules/grunt/node_modules/async/README.md
generated
vendored
File diff suppressed because it is too large
Load diff
35
Phaser/node_modules/grunt/node_modules/async/package.json
generated
vendored
35
Phaser/node_modules/grunt/node_modules/async/package.json
generated
vendored
File diff suppressed because one or more lines are too long
11
Phaser/node_modules/grunt/node_modules/coffee-script/.npmignore
generated
vendored
11
Phaser/node_modules/grunt/node_modules/coffee-script/.npmignore
generated
vendored
|
@ -1,11 +0,0 @@
|
|||
*.coffee
|
||||
*.html
|
||||
.DS_Store
|
||||
.git*
|
||||
Cakefile
|
||||
documentation/
|
||||
examples/
|
||||
extras/coffee-script.js
|
||||
raw/
|
||||
src/
|
||||
test/
|
1
Phaser/node_modules/grunt/node_modules/coffee-script/CNAME
generated
vendored
1
Phaser/node_modules/grunt/node_modules/coffee-script/CNAME
generated
vendored
|
@ -1 +0,0 @@
|
|||
coffeescript.org
|
22
Phaser/node_modules/grunt/node_modules/coffee-script/LICENSE
generated
vendored
22
Phaser/node_modules/grunt/node_modules/coffee-script/LICENSE
generated
vendored
|
@ -1,22 +0,0 @@
|
|||
Copyright (c) 2009-2012 Jeremy Ashkenas
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
51
Phaser/node_modules/grunt/node_modules/coffee-script/README
generated
vendored
51
Phaser/node_modules/grunt/node_modules/coffee-script/README
generated
vendored
|
@ -1,51 +0,0 @@
|
|||
|
||||
{
|
||||
} } {
|
||||
{ { } }
|
||||
} }{ {
|
||||
{ }{ } } _____ __ __
|
||||
( }{ }{ { ) / ____| / _|/ _|
|
||||
.- { { } { }} -. | | ___ | |_| |_ ___ ___
|
||||
( ( } { } { } } ) | | / _ \| _| _/ _ \/ _ \
|
||||
|`-..________ ..-'| | |___| (_) | | | || __/ __/
|
||||
| | \_____\___/|_| |_| \___|\___|
|
||||
| ;--.
|
||||
| (__ \ _____ _ _
|
||||
| | ) ) / ____| (_) | |
|
||||
| |/ / | (___ ___ _ __ _ _ __ | |_
|
||||
| ( / \___ \ / __| '__| | '_ \| __|
|
||||
| |/ ____) | (__| | | | |_) | |_
|
||||
| | |_____/ \___|_| |_| .__/ \__|
|
||||
`-.._________..-' | |
|
||||
|_|
|
||||
|
||||
|
||||
CoffeeScript is a little language that compiles into JavaScript.
|
||||
|
||||
Install Node.js, and then the CoffeeScript compiler:
|
||||
sudo bin/cake install
|
||||
|
||||
Or, if you have the Node Package Manager installed:
|
||||
npm install -g coffee-script
|
||||
(Leave off the -g if you don't wish to install globally.)
|
||||
|
||||
Execute a script:
|
||||
coffee /path/to/script.coffee
|
||||
|
||||
Compile a script:
|
||||
coffee -c /path/to/script.coffee
|
||||
|
||||
For documentation, usage, and examples, see:
|
||||
http://coffeescript.org/
|
||||
|
||||
To suggest a feature, report a bug, or general discussion:
|
||||
http://github.com/jashkenas/coffee-script/issues/
|
||||
|
||||
If you'd like to chat, drop by #coffeescript on Freenode IRC,
|
||||
or on webchat.freenode.net.
|
||||
|
||||
The source repository:
|
||||
git://github.com/jashkenas/coffee-script.git
|
||||
|
||||
All contributors are listed here:
|
||||
http://github.com/jashkenas/coffee-script/contributors
|
78
Phaser/node_modules/grunt/node_modules/coffee-script/Rakefile
generated
vendored
78
Phaser/node_modules/grunt/node_modules/coffee-script/Rakefile
generated
vendored
|
@ -1,78 +0,0 @@
|
|||
require 'rubygems'
|
||||
require 'erb'
|
||||
require 'fileutils'
|
||||
require 'rake/testtask'
|
||||
require 'json'
|
||||
|
||||
desc "Build the documentation page"
|
||||
task :doc do
|
||||
source = 'documentation/index.html.erb'
|
||||
child = fork { exec "bin/coffee -bcw -o documentation/js documentation/coffee/*.coffee" }
|
||||
at_exit { Process.kill("INT", child) }
|
||||
Signal.trap("INT") { exit }
|
||||
loop do
|
||||
mtime = File.stat(source).mtime
|
||||
if !@mtime || mtime > @mtime
|
||||
rendered = ERB.new(File.read(source)).result(binding)
|
||||
File.open('index.html', 'w+') {|f| f.write(rendered) }
|
||||
end
|
||||
@mtime = mtime
|
||||
sleep 1
|
||||
end
|
||||
end
|
||||
|
||||
desc "Build coffee-script-source gem"
|
||||
task :gem do
|
||||
require 'rubygems'
|
||||
require 'rubygems/package'
|
||||
|
||||
gemspec = Gem::Specification.new do |s|
|
||||
s.name = 'coffee-script-source'
|
||||
s.version = JSON.parse(File.read('package.json'))["version"]
|
||||
s.date = Time.now.strftime("%Y-%m-%d")
|
||||
|
||||
s.homepage = "http://jashkenas.github.com/coffee-script/"
|
||||
s.summary = "The CoffeeScript Compiler"
|
||||
s.description = <<-EOS
|
||||
CoffeeScript is a little language that compiles into JavaScript.
|
||||
Underneath all of those embarrassing braces and semicolons,
|
||||
JavaScript has always had a gorgeous object model at its heart.
|
||||
CoffeeScript is an attempt to expose the good parts of JavaScript
|
||||
in a simple way.
|
||||
EOS
|
||||
|
||||
s.files = [
|
||||
'lib/coffee_script/coffee-script.js',
|
||||
'lib/coffee_script/source.rb'
|
||||
]
|
||||
|
||||
s.authors = ['Jeremy Ashkenas']
|
||||
s.email = 'jashkenas@gmail.com'
|
||||
s.rubyforge_project = 'coffee-script-source'
|
||||
end
|
||||
|
||||
file = File.open("coffee-script-source.gem", "w")
|
||||
Gem::Package.open(file, 'w') do |pkg|
|
||||
pkg.metadata = gemspec.to_yaml
|
||||
|
||||
path = "lib/coffee_script/source.rb"
|
||||
contents = <<-ERUBY
|
||||
module CoffeeScript
|
||||
module Source
|
||||
def self.bundled_path
|
||||
File.expand_path("../coffee-script.js", __FILE__)
|
||||
end
|
||||
end
|
||||
end
|
||||
ERUBY
|
||||
pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
|
||||
tar_io.write(contents)
|
||||
end
|
||||
|
||||
contents = File.read("extras/coffee-script.js")
|
||||
path = "lib/coffee_script/coffee-script.js"
|
||||
pkg.add_file_simple(path, 0644, contents.size) do |tar_io|
|
||||
tar_io.write(contents)
|
||||
end
|
||||
end
|
||||
end
|
44
Phaser/node_modules/grunt/node_modules/coffee-script/extras/jsl.conf
generated
vendored
44
Phaser/node_modules/grunt/node_modules/coffee-script/extras/jsl.conf
generated
vendored
|
@ -1,44 +0,0 @@
|
|||
# JavaScriptLint configuration file for CoffeeScript.
|
||||
|
||||
+no_return_value # function {0} does not always return a value
|
||||
+duplicate_formal # duplicate formal argument {0}
|
||||
-equal_as_assign # test for equality (==) mistyped as assignment (=)?{0}
|
||||
+var_hides_arg # variable {0} hides argument
|
||||
+redeclared_var # redeclaration of {0} {1}
|
||||
-anon_no_return_value # anonymous function does not always return a value
|
||||
+missing_semicolon # missing semicolon
|
||||
+meaningless_block # meaningless block; curly braces have no impact
|
||||
-comma_separated_stmts # multiple statements separated by commas (use semicolons?)
|
||||
+unreachable_code # unreachable code
|
||||
+missing_break # missing break statement
|
||||
-missing_break_for_last_case # missing break statement for last case in switch
|
||||
-comparison_type_conv # comparisons against null, 0, true, false, or an empty string allowing implicit type conversion (use === or !==)
|
||||
-inc_dec_within_stmt # increment (++) and decrement (--) operators used as part of greater statement
|
||||
-useless_void # use of the void type may be unnecessary (void is always undefined)
|
||||
+multiple_plus_minus # unknown order of operations for successive plus (e.g. x+++y) or minus (e.g. x---y) signs
|
||||
+use_of_label # use of label
|
||||
-block_without_braces # block statement without curly braces
|
||||
+leading_decimal_point # leading decimal point may indicate a number or an object member
|
||||
+trailing_decimal_point # trailing decimal point may indicate a number or an object member
|
||||
+octal_number # leading zeros make an octal number
|
||||
+nested_comment # nested comment
|
||||
+misplaced_regex # regular expressions should be preceded by a left parenthesis, assignment, colon, or comma
|
||||
+ambiguous_newline # unexpected end of line; it is ambiguous whether these lines are part of the same statement
|
||||
+empty_statement # empty statement or extra semicolon
|
||||
-missing_option_explicit # the "option explicit" control comment is missing
|
||||
+partial_option_explicit # the "option explicit" control comment, if used, must be in the first script tag
|
||||
+dup_option_explicit # duplicate "option explicit" control comment
|
||||
+useless_assign # useless assignment
|
||||
+ambiguous_nested_stmt # block statements containing block statements should use curly braces to resolve ambiguity
|
||||
+ambiguous_else_stmt # the else statement could be matched with one of multiple if statements (use curly braces to indicate intent)
|
||||
-missing_default_case # missing default case in switch statement
|
||||
+duplicate_case_in_switch # duplicate case in switch statements
|
||||
+default_not_at_end # the default case is not at the end of the switch statement
|
||||
+legacy_cc_not_understood # couldn't understand control comment using /*@keyword@*/ syntax
|
||||
+jsl_cc_not_understood # couldn't understand control comment using /*jsl:keyword*/ syntax
|
||||
+useless_comparison # useless comparison; comparing identical expressions
|
||||
+with_statement # with statement hides undeclared variables; use temporary variable instead
|
||||
+trailing_comma_in_array # extra comma is not recommended in array initializers
|
||||
+assign_to_function_call # assignment to a function call
|
||||
+parseint_missing_radix # parseInt missing radix parameter
|
||||
+lambda_assign_requires_semicolon
|
49
Phaser/node_modules/grunt/node_modules/coffee-script/package.json
generated
vendored
49
Phaser/node_modules/grunt/node_modules/coffee-script/package.json
generated
vendored
|
@ -1,49 +0,0 @@
|
|||
{
|
||||
"name": "coffee-script",
|
||||
"description": "Unfancy JavaScript",
|
||||
"keywords": [
|
||||
"javascript",
|
||||
"language",
|
||||
"coffeescript",
|
||||
"compiler"
|
||||
],
|
||||
"author": {
|
||||
"name": "Jeremy Ashkenas"
|
||||
},
|
||||
"version": "1.3.3",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"engines": {
|
||||
"node": ">=0.4.0"
|
||||
},
|
||||
"directories": {
|
||||
"lib": "./lib/coffee-script"
|
||||
},
|
||||
"main": "./lib/coffee-script/coffee-script",
|
||||
"bin": {
|
||||
"coffee": "./bin/coffee",
|
||||
"cake": "./bin/cake"
|
||||
},
|
||||
"homepage": "http://coffeescript.org",
|
||||
"bugs": "https://github.com/jashkenas/coffee-script/issues",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/jashkenas/coffee-script.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"uglify-js": ">=1.0.0",
|
||||
"jison": ">=0.2.0"
|
||||
},
|
||||
"readme": "\n {\n } } {\n { { } }\n } }{ {\n { }{ } } _____ __ __\n ( }{ }{ { ) / ____| / _|/ _|\n .- { { } { }} -. | | ___ | |_| |_ ___ ___\n ( ( } { } { } } ) | | / _ \\| _| _/ _ \\/ _ \\\n |`-..________ ..-'| | |___| (_) | | | || __/ __/\n | | \\_____\\___/|_| |_| \\___|\\___|\n | ;--.\n | (__ \\ _____ _ _\n | | ) ) / ____| (_) | |\n | |/ / | (___ ___ _ __ _ _ __ | |_\n | ( / \\___ \\ / __| '__| | '_ \\| __|\n | |/ ____) | (__| | | | |_) | |_\n | | |_____/ \\___|_| |_| .__/ \\__|\n `-.._________..-' | |\n |_|\n\n\n CoffeeScript is a little language that compiles into JavaScript.\n\n Install Node.js, and then the CoffeeScript compiler:\n sudo bin/cake install\n\n Or, if you have the Node Package Manager installed:\n npm install -g coffee-script\n (Leave off the -g if you don't wish to install globally.)\n\n Execute a script:\n coffee /path/to/script.coffee\n\n Compile a script:\n coffee -c /path/to/script.coffee\n\n For documentation, usage, and examples, see:\n http://coffeescript.org/\n\n To suggest a feature, report a bug, or general discussion:\n http://github.com/jashkenas/coffee-script/issues/\n\n If you'd like to chat, drop by #coffeescript on Freenode IRC,\n or on webchat.freenode.net.\n\n The source repository:\n git://github.com/jashkenas/coffee-script.git\n\n All contributors are listed here:\n http://github.com/jashkenas/coffee-script/contributors\n",
|
||||
"readmeFilename": "README",
|
||||
"_id": "coffee-script@1.3.3",
|
||||
"dist": {
|
||||
"shasum": "d41e076292bcf98fbb2753e76e1a07a8be5db9b7"
|
||||
},
|
||||
"_from": "coffee-script@~1.3.3",
|
||||
"_resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.3.3.tgz"
|
||||
}
|
22
Phaser/node_modules/grunt/node_modules/colors/MIT-LICENSE.txt
generated
vendored
22
Phaser/node_modules/grunt/node_modules/colors/MIT-LICENSE.txt
generated
vendored
|
@ -1,22 +0,0 @@
|
|||
Copyright (c) 2010
|
||||
|
||||
Marak Squires
|
||||
Alexis Sellier (cloudhead)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
77
Phaser/node_modules/grunt/node_modules/colors/ReadMe.md
generated
vendored
77
Phaser/node_modules/grunt/node_modules/colors/ReadMe.md
generated
vendored
|
@ -1,77 +0,0 @@
|
|||
# colors.js - get color and style in your node.js console ( and browser ) like what
|
||||
|
||||
<img src="http://i.imgur.com/goJdO.png" border = "0"/>
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
npm install colors
|
||||
|
||||
## colors and styles!
|
||||
|
||||
- bold
|
||||
- italic
|
||||
- underline
|
||||
- inverse
|
||||
- yellow
|
||||
- cyan
|
||||
- white
|
||||
- magenta
|
||||
- green
|
||||
- red
|
||||
- grey
|
||||
- blue
|
||||
- rainbow
|
||||
- zebra
|
||||
- random
|
||||
|
||||
## Usage
|
||||
|
||||
``` js
|
||||
var colors = require('./colors');
|
||||
|
||||
console.log('hello'.green); // outputs green text
|
||||
console.log('i like cake and pies'.underline.red) // outputs red underlined text
|
||||
console.log('inverse the color'.inverse); // inverses the color
|
||||
console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)
|
||||
```
|
||||
|
||||
# Creating Custom themes
|
||||
|
||||
```js
|
||||
|
||||
var require('colors');
|
||||
|
||||
colors.setTheme({
|
||||
silly: 'rainbow',
|
||||
input: 'grey',
|
||||
verbose: 'cyan',
|
||||
prompt: 'grey',
|
||||
info: 'green',
|
||||
data: 'grey',
|
||||
help: 'cyan',
|
||||
warn: 'yellow',
|
||||
debug: 'blue',
|
||||
error: 'red'
|
||||
});
|
||||
|
||||
// outputs red text
|
||||
console.log("this is an error".error);
|
||||
|
||||
// outputs yellow text
|
||||
console.log("this is a warning".warn);
|
||||
```
|
||||
|
||||
|
||||
### Contributors
|
||||
|
||||
Marak (Marak Squires)
|
||||
Alexis Sellier (cloudhead)
|
||||
mmalecki (Maciej Małecki)
|
||||
nicoreed (Nico Reed)
|
||||
morganrallen (Morgan Allen)
|
||||
JustinCampbell (Justin Campbell)
|
||||
ded (Dustin Diaz)
|
||||
|
||||
|
||||
#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)
|
74
Phaser/node_modules/grunt/node_modules/colors/example.html
generated
vendored
74
Phaser/node_modules/grunt/node_modules/colors/example.html
generated
vendored
|
@ -1,74 +0,0 @@
|
|||
<!DOCTYPE HTML>
|
||||
<html lang="en-us">
|
||||
<head>
|
||||
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
||||
<title>Colors Example</title>
|
||||
<script src="colors.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
|
||||
var test = colors.red("hopefully colorless output");
|
||||
|
||||
document.write('Rainbows are fun!'.rainbow + '<br/>');
|
||||
document.write('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported
|
||||
document.write('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported
|
||||
//document.write('zalgo time!'.zalgo);
|
||||
document.write(test.stripColors);
|
||||
document.write("a".grey + " b".black);
|
||||
|
||||
document.write("Zebras are so fun!".zebra);
|
||||
|
||||
document.write(colors.rainbow('Rainbows are fun!'));
|
||||
document.write(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported
|
||||
document.write(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported
|
||||
//document.write(colors.zalgo('zalgo time!'));
|
||||
document.write(colors.stripColors(test));
|
||||
document.write(colors.grey("a") + colors.black(" b"));
|
||||
|
||||
colors.addSequencer("america", function(letter, i, exploded) {
|
||||
if(letter === " ") return letter;
|
||||
switch(i%3) {
|
||||
case 0: return letter.red;
|
||||
case 1: return letter.white;
|
||||
case 2: return letter.blue;
|
||||
}
|
||||
});
|
||||
|
||||
colors.addSequencer("random", (function() {
|
||||
var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta'];
|
||||
|
||||
return function(letter, i, exploded) {
|
||||
return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]];
|
||||
};
|
||||
})());
|
||||
|
||||
document.write("AMERICA! F--K YEAH!".america);
|
||||
document.write("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random);
|
||||
|
||||
//
|
||||
// Custom themes
|
||||
//
|
||||
|
||||
colors.setTheme({
|
||||
silly: 'rainbow',
|
||||
input: 'grey',
|
||||
verbose: 'cyan',
|
||||
prompt: 'grey',
|
||||
info: 'green',
|
||||
data: 'grey',
|
||||
help: 'cyan',
|
||||
warn: 'yellow',
|
||||
debug: 'blue',
|
||||
error: 'red'
|
||||
});
|
||||
|
||||
// outputs red text
|
||||
document.write("this is an error".error);
|
||||
|
||||
// outputs yellow text
|
||||
document.write("this is a warning".warn);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
24
Phaser/node_modules/grunt/node_modules/colors/package.json
generated
vendored
24
Phaser/node_modules/grunt/node_modules/colors/package.json
generated
vendored
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"name": "colors",
|
||||
"description": "get colors in your node.js console like what",
|
||||
"version": "0.6.0-1",
|
||||
"author": {
|
||||
"name": "Marak Squires"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/Marak/colors.js.git"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.1.90"
|
||||
},
|
||||
"main": "colors",
|
||||
"readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n<img src=\"http://i.imgur.com/goJdO.png\" border = \"0\"/>\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej Małecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n",
|
||||
"readmeFilename": "ReadMe.md",
|
||||
"_id": "colors@0.6.0-1",
|
||||
"dist": {
|
||||
"shasum": "322d52c6f629babb21b1713e6365d1b6ec1937bd"
|
||||
},
|
||||
"_from": "colors@~0.6.0-1",
|
||||
"_resolved": "https://registry.npmjs.org/colors/-/colors-0.6.0-1.tgz"
|
||||
}
|
67
Phaser/node_modules/grunt/node_modules/dateformat/Readme.md
generated
vendored
67
Phaser/node_modules/grunt/node_modules/dateformat/Readme.md
generated
vendored
|
@ -1,67 +0,0 @@
|
|||
# node-dateformat
|
||||
|
||||
A node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.
|
||||
|
||||
## Modifications
|
||||
|
||||
* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.
|
||||
* Added a `module.exports = dateFormat;` statement at the bottom
|
||||
|
||||
## Usage
|
||||
|
||||
As taken from Steven's post, modified to match the Modifications listed above:
|
||||
|
||||
var dateFormat = require('dateformat');
|
||||
var now = new Date();
|
||||
|
||||
// Basic usage
|
||||
dateFormat(now, "dddd, mmmm dS, yyyy, h:MM:ss TT");
|
||||
// Saturday, June 9th, 2007, 5:46:21 PM
|
||||
|
||||
// You can use one of several named masks
|
||||
dateFormat(now, "isoDateTime");
|
||||
// 2007-06-09T17:46:21
|
||||
|
||||
// ...Or add your own
|
||||
dateFormat.masks.hammerTime = 'HH:MM! "Can\'t touch this!"';
|
||||
dateFormat(now, "hammerTime");
|
||||
// 17:46! Can't touch this!
|
||||
|
||||
// When using the standalone dateFormat function,
|
||||
// you can also provide the date as a string
|
||||
dateFormat("Jun 9 2007", "fullDate");
|
||||
// Saturday, June 9, 2007
|
||||
|
||||
// Note that if you don't include the mask argument,
|
||||
// dateFormat.masks.default is used
|
||||
dateFormat(now);
|
||||
// Sat Jun 09 2007 17:46:21
|
||||
|
||||
// And if you don't include the date argument,
|
||||
// the current date and time is used
|
||||
dateFormat();
|
||||
// Sat Jun 09 2007 17:46:22
|
||||
|
||||
// You can also skip the date argument (as long as your mask doesn't
|
||||
// contain any numbers), in which case the current date/time is used
|
||||
dateFormat("longTime");
|
||||
// 5:46:22 PM EST
|
||||
|
||||
// And finally, you can convert local time to UTC time. Simply pass in
|
||||
// true as an additional argument (no argument skipping allowed in this case):
|
||||
dateFormat(now, "longTime", true);
|
||||
// 10:46:21 PM UTC
|
||||
|
||||
// ...Or add the prefix "UTC:" to your mask.
|
||||
dateFormat(now, "UTC:h:MM:ss TT Z");
|
||||
// 10:46:21 PM UTC
|
||||
|
||||
// You can also get the ISO 8601 week of the year:
|
||||
dateFormat(now, "W");
|
||||
// 42
|
||||
## License
|
||||
|
||||
(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.
|
||||
|
||||
[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format
|
||||
[stevenlevithan]: http://stevenlevithan.com/
|
24
Phaser/node_modules/grunt/node_modules/dateformat/package.json
generated
vendored
24
Phaser/node_modules/grunt/node_modules/dateformat/package.json
generated
vendored
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"name": "dateformat",
|
||||
"description": "A node.js package for Steven Levithan's excellent dateFormat() function.",
|
||||
"maintainers": "Felix Geisendörfer <felix@debuggable.com>",
|
||||
"homepage": "https://github.com/felixge/node-dateformat",
|
||||
"author": {
|
||||
"name": "Steven Levithan"
|
||||
},
|
||||
"version": "1.0.2-1.2.3",
|
||||
"main": "./lib/dateformat",
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"engines": {
|
||||
"node": "*"
|
||||
},
|
||||
"readme": "# node-dateformat\n\nA node.js package for Steven Levithan's excellent [dateFormat()][dateformat] function.\n\n## Modifications\n\n* Removed the `Date.prototype.format` method. Sorry folks, but extending native prototypes is for suckers.\n* Added a `module.exports = dateFormat;` statement at the bottom\n\n## Usage\n\nAs taken from Steven's post, modified to match the Modifications listed above:\n\n var dateFormat = require('dateformat');\n var now = new Date();\n\n // Basic usage\n dateFormat(now, \"dddd, mmmm dS, yyyy, h:MM:ss TT\");\n // Saturday, June 9th, 2007, 5:46:21 PM\n\n // You can use one of several named masks\n dateFormat(now, \"isoDateTime\");\n // 2007-06-09T17:46:21\n\n // ...Or add your own\n dateFormat.masks.hammerTime = 'HH:MM! \"Can\\'t touch this!\"';\n dateFormat(now, \"hammerTime\");\n // 17:46! Can't touch this!\n\n // When using the standalone dateFormat function,\n // you can also provide the date as a string\n dateFormat(\"Jun 9 2007\", \"fullDate\");\n // Saturday, June 9, 2007\n\n // Note that if you don't include the mask argument,\n // dateFormat.masks.default is used\n dateFormat(now);\n // Sat Jun 09 2007 17:46:21\n\n // And if you don't include the date argument,\n // the current date and time is used\n dateFormat();\n // Sat Jun 09 2007 17:46:22\n\n // You can also skip the date argument (as long as your mask doesn't\n // contain any numbers), in which case the current date/time is used\n dateFormat(\"longTime\");\n // 5:46:22 PM EST\n\n // And finally, you can convert local time to UTC time. Simply pass in\n // true as an additional argument (no argument skipping allowed in this case):\n dateFormat(now, \"longTime\", true);\n // 10:46:21 PM UTC\n\n // ...Or add the prefix \"UTC:\" to your mask.\n dateFormat(now, \"UTC:h:MM:ss TT Z\");\n // 10:46:21 PM UTC\n\n // You can also get the ISO 8601 week of the year:\n dateFormat(now, \"W\");\n // 42\n## License\n\n(c) 2007-2009 Steven Levithan [stevenlevithan.com][stevenlevithan], MIT license.\n\n[dateformat]: http://blog.stevenlevithan.com/archives/date-time-format\n[stevenlevithan]: http://stevenlevithan.com/\n",
|
||||
"readmeFilename": "Readme.md",
|
||||
"_id": "dateformat@1.0.2-1.2.3",
|
||||
"dist": {
|
||||
"shasum": "692290ea53102d50a82968882eab448a048a7f23"
|
||||
},
|
||||
"_from": "dateformat@1.0.2-1.2.3",
|
||||
"_resolved": "https://registry.npmjs.org/dateformat/-/dateformat-1.0.2-1.2.3.tgz"
|
||||
}
|
27
Phaser/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh
generated
vendored
27
Phaser/node_modules/grunt/node_modules/dateformat/test/test_weekofyear.sh
generated
vendored
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# this just takes php's date() function as a reference to check if week of year
|
||||
# is calculated correctly in the range from 1970 .. 2038 by brute force...
|
||||
|
||||
SEQ="seq"
|
||||
SYSTEM=`uname`
|
||||
if [ "$SYSTEM" = "Darwin" ]; then
|
||||
SEQ="jot"
|
||||
fi
|
||||
|
||||
for YEAR in {1970..2038}; do
|
||||
for MONTH in {1..12}; do
|
||||
DAYS=$(cal $MONTH $YEAR | egrep "28|29|30|31" |tail -1 |awk '{print $NF}')
|
||||
for DAY in $( $SEQ $DAYS ); do
|
||||
DATE=$YEAR-$MONTH-$DAY
|
||||
echo -n $DATE ...
|
||||
NODEVAL=$(node test_weekofyear.js $DATE)
|
||||
PHPVAL=$(php -r "echo intval(date('W', strtotime('$DATE')));")
|
||||
if [ "$NODEVAL" -ne "$PHPVAL" ]; then
|
||||
echo "MISMATCH: node: $NODEVAL vs php: $PHPVAL for date $DATE"
|
||||
else
|
||||
echo " OK"
|
||||
fi
|
||||
done
|
||||
done
|
||||
done
|
13
Phaser/node_modules/grunt/node_modules/eventemitter2/.npmignore
generated
vendored
13
Phaser/node_modules/grunt/node_modules/eventemitter2/.npmignore
generated
vendored
|
@ -1,13 +0,0 @@
|
|||
#ignore these files
|
||||
*.swp
|
||||
*~
|
||||
*.lock
|
||||
*.DS_Store
|
||||
node_modules
|
||||
npm-debug.log
|
||||
*.out
|
||||
*.o
|
||||
*.tmp
|
||||
|
||||
|
||||
|
212
Phaser/node_modules/grunt/node_modules/eventemitter2/README.md
generated
vendored
212
Phaser/node_modules/grunt/node_modules/eventemitter2/README.md
generated
vendored
|
@ -1,212 +0,0 @@
|
|||
# EventEmitter2
|
||||
|
||||
EventEmitter2 is a an implementation of the EventEmitter found in Node.js
|
||||
|
||||
## Features
|
||||
|
||||
- Namespaces/Wildcards.
|
||||
- Times To Listen (TTL), extends the `once` concept with `many`.
|
||||
- Browser environment compatibility.
|
||||
- Demonstrates good performance in benchmarks
|
||||
|
||||
```
|
||||
EventEmitterHeatUp x 3,728,965 ops/sec \302\2610.68% (60 runs sampled)
|
||||
EventEmitter x 2,822,904 ops/sec \302\2610.74% (63 runs sampled)
|
||||
EventEmitter2 x 7,251,227 ops/sec \302\2610.55% (58 runs sampled)
|
||||
EventEmitter2 (wild) x 3,220,268 ops/sec \302\2610.44% (65 runs sampled)
|
||||
Fastest is EventEmitter2
|
||||
```
|
||||
|
||||
## Differences (Non breaking, compatible with existing EventEmitter)
|
||||
|
||||
- The constructor takes a configuration object.
|
||||
|
||||
```javascript
|
||||
var EventEmitter2 = require('eventemitter2').EventEmitter2;
|
||||
var server = new EventEmitter2({
|
||||
wildcard: true, // should the event emitter use wildcards.
|
||||
delimiter: '::', // the delimiter used to segment namespaces, defaults to `.`.
|
||||
newListener: false, // if you want to emit the newListener event set to true.
|
||||
maxListeners: 20, // the max number of listeners that can be assigned to an event, defaults to 10.
|
||||
});
|
||||
```
|
||||
|
||||
- Getting the actual event that fired.
|
||||
|
||||
```javascript
|
||||
server.on('foo.*', function(value1, value2) {
|
||||
console.log(this.event, value1, value2);
|
||||
});
|
||||
```
|
||||
|
||||
- Fire an event N times and then remove it, an extension of the `once` concept.
|
||||
|
||||
```javascript
|
||||
server.many('foo', 4, function() {
|
||||
console.log('hello');
|
||||
});
|
||||
```
|
||||
|
||||
- Pass in a namespaced event as an array rather than a delimited string.
|
||||
|
||||
```javascript
|
||||
server.many(['foo', 'bar', 'bazz'], function() {
|
||||
console.log('hello');
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
When an `EventEmitter` instance experiences an error, the typical action is
|
||||
to emit an `error` event. Error events are treated as a special case.
|
||||
If there is no listener for it, then the default action is to print a stack
|
||||
trace and exit the program.
|
||||
|
||||
All EventEmitters emit the event `newListener` when new listeners are
|
||||
added.
|
||||
|
||||
|
||||
**Namespaces** with **Wildcards**
|
||||
To use namespaces/wildcards, pass the `wildcard` option into the EventEmitter constructor.
|
||||
When namespaces/wildcards are enabled, events can either be strings (`foo.bar`) separated
|
||||
by a delimiter or arrays (`['foo', 'bar']`). The delimiter is also configurable as a
|
||||
constructor option.
|
||||
|
||||
An event name passed to any event emitter method can contain a wild card (the `*` character).
|
||||
If the event name is a string, a wildcard may appear as `foo.*`. If the event name is an array,
|
||||
the wildcard may appear as `['foo', '*']`.
|
||||
|
||||
If either of the above described events were passed to the `on` method, subsequent emits such
|
||||
as the following would be observed...
|
||||
|
||||
```javascript
|
||||
emitter.emit('foo.bazz');
|
||||
emitter.emit(['foo', 'bar']);
|
||||
```
|
||||
|
||||
|
||||
#### emitter.addListener(event, listener)
|
||||
#### emitter.on(event, listener)
|
||||
|
||||
Adds a listener to the end of the listeners array for the specified event.
|
||||
|
||||
```javascript
|
||||
server.on('data', function(value1, value2, value3 /* accepts any number of expected values... */) {
|
||||
console.log('The event was raised!');
|
||||
});
|
||||
```
|
||||
|
||||
```javascript
|
||||
server.on('data', function(value) {
|
||||
console.log('The event was raised!');
|
||||
});
|
||||
```
|
||||
|
||||
#### emitter.onAny(listener)
|
||||
|
||||
Adds a listener that will be fired when any event is emitted.
|
||||
|
||||
```javascript
|
||||
server.onAny(function(value) {
|
||||
console.log('All events trigger this.');
|
||||
});
|
||||
```
|
||||
|
||||
#### emitter.offAny(listener)
|
||||
|
||||
Removes the listener that will be fired when any event is emitted.
|
||||
|
||||
```javascript
|
||||
server.offAny(function(value) {
|
||||
console.log('The event was raised!');
|
||||
});
|
||||
```
|
||||
|
||||
#### emitter.once(event, listener)
|
||||
|
||||
Adds a **one time** listener for the event. The listener is invoked only the first time the event is fired, after which it is removed.
|
||||
|
||||
```javascript
|
||||
server.once('get', function (value) {
|
||||
console.log('Ah, we have our first value!');
|
||||
});
|
||||
```
|
||||
|
||||
#### emitter.many(event, timesToListen, listener)
|
||||
|
||||
Adds a listener that will execute **n times** for the event before being removed. The listener is invoked only the first time the event is fired, after which it is removed.
|
||||
|
||||
```javascript
|
||||
server.many('get', 4, function (value) {
|
||||
console.log('This event will be listened to exactly four times.');
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
#### emitter.removeListener(event, listener)
|
||||
#### emitter.off(event, listener)
|
||||
|
||||
Remove a listener from the listener array for the specified event. **Caution**: changes array indices in the listener array behind the listener.
|
||||
|
||||
```javascript
|
||||
var callback = function(value) {
|
||||
console.log('someone connected!');
|
||||
};
|
||||
server.on('get', callback);
|
||||
// ...
|
||||
server.removeListener('get', callback);
|
||||
```
|
||||
|
||||
|
||||
#### emitter.removeAllListeners([event])
|
||||
|
||||
Removes all listeners, or those of the specified event.
|
||||
|
||||
|
||||
#### emitter.setMaxListeners(n)
|
||||
|
||||
By default EventEmitters will print a warning if more than 10 listeners are added to it. This is a useful default which helps finding memory leaks. Obviously not all Emitters should be limited to 10. This function allows that to be increased. Set to zero for unlimited.
|
||||
|
||||
|
||||
#### emitter.listeners(event)
|
||||
|
||||
Returns an array of listeners for the specified event. This array can be manipulated, e.g. to remove listeners.
|
||||
|
||||
```javascript
|
||||
server.on('get', function(value) {
|
||||
console.log('someone connected!');
|
||||
});
|
||||
console.log(console.log(server.listeners('get')); // [ [Function] ]
|
||||
```
|
||||
|
||||
#### emitter.listenersAny()
|
||||
|
||||
Returns an array of listeners that are listening for any event that is specified. This array can be manipulated, e.g. to remove listeners.
|
||||
|
||||
```javascript
|
||||
server.onAny(function(value) {
|
||||
console.log('someone connected!');
|
||||
});
|
||||
console.log(console.log(server.listenersAny()[0]); // [ [Function] ] // someone connected!
|
||||
```
|
||||
|
||||
#### emitter.emit(event, [arg1], [arg2], [...])
|
||||
|
||||
Execute each of the listeners that may be listening for the specified event name in order with the list of arguments.
|
||||
|
||||
## Test coverage
|
||||
|
||||
There is a test suite that tries to cover each use case, it can be found <a href="https://github.com/hij1nx/EventEmitter2/tree/master/test">here</a>.
|
||||
|
||||
## Licence
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2011 hij1nx <http://www.twitter.com/hij1nx>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
78
Phaser/node_modules/grunt/node_modules/eventemitter2/package.json
generated
vendored
78
Phaser/node_modules/grunt/node_modules/eventemitter2/package.json
generated
vendored
File diff suppressed because one or more lines are too long
16
Phaser/node_modules/grunt/node_modules/findup-sync/.jshintrc
generated
vendored
16
Phaser/node_modules/grunt/node_modules/findup-sync/.jshintrc
generated
vendored
|
@ -1,16 +0,0 @@
|
|||
{
|
||||
"loopfunc": true,
|
||||
"curly": true,
|
||||
"eqeqeq": true,
|
||||
"immed": true,
|
||||
"latedef": true,
|
||||
"newcap": true,
|
||||
"noarg": true,
|
||||
"sub": true,
|
||||
"undef": true,
|
||||
"unused": true,
|
||||
"boss": true,
|
||||
"eqnull": true,
|
||||
"node": true,
|
||||
"es5": true
|
||||
}
|
0
Phaser/node_modules/grunt/node_modules/findup-sync/.npmignore
generated
vendored
0
Phaser/node_modules/grunt/node_modules/findup-sync/.npmignore
generated
vendored
22
Phaser/node_modules/grunt/node_modules/findup-sync/LICENSE-MIT
generated
vendored
22
Phaser/node_modules/grunt/node_modules/findup-sync/LICENSE-MIT
generated
vendored
|
@ -1,22 +0,0 @@
|
|||
Copyright (c) 2013 "Cowboy" Ben Alman
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
44
Phaser/node_modules/grunt/node_modules/findup-sync/README.md
generated
vendored
44
Phaser/node_modules/grunt/node_modules/findup-sync/README.md
generated
vendored
|
@ -1,44 +0,0 @@
|
|||
# findup-sync
|
||||
|
||||
Find the first file matching a given pattern in the current directory or the nearest ancestor directory.
|
||||
|
||||
## Getting Started
|
||||
Install the module with: `npm install findup-sync`
|
||||
|
||||
```js
|
||||
var findup = require('findup-sync');
|
||||
|
||||
// Start looking in the CWD.
|
||||
var filepath1 = findup('{a,b}*.txt');
|
||||
|
||||
// Start looking somewhere else, and ignore case (probably a good idea).
|
||||
var filepath2 = findup('{a,b}*.txt', {cwd: '/some/path', nocase: true});
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
findup(patternOrPatterns [, minimatchOptions])
|
||||
```
|
||||
|
||||
### patternOrPatterns
|
||||
Type: `String` or `Array`
|
||||
Default: none
|
||||
|
||||
One or more wildcard glob patterns. Or just filenames.
|
||||
|
||||
### minimatchOptions
|
||||
Type: `Object`
|
||||
Default: `{}`
|
||||
|
||||
Options to be passed to [minimatch](https://github.com/isaacs/minimatch).
|
||||
|
||||
Note that if you want to start in a different directory than the current working directory, specify a `cwd` property here.
|
||||
|
||||
## Contributing
|
||||
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).
|
||||
|
||||
## Release History
|
||||
2013-03-08 - v0.1.2 - Updated dependencies. Fixed a Node 0.9.x bug. Updated unit tests to work cross-platform.
|
||||
2012-11-15 - v0.1.1 - Now works without an options object.
|
||||
2012-11-01 - v0.1.0 - Initial release.
|
1
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/.bin/lodash
generated
vendored
1
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/.bin/lodash
generated
vendored
|
@ -1 +0,0 @@
|
|||
../lodash/build.js
|
22
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/LICENSE.txt
generated
vendored
22
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/LICENSE.txt
generated
vendored
|
@ -1,22 +0,0 @@
|
|||
Copyright 2012-2013 The Dojo Foundation <http://dojofoundation.org/>
|
||||
Based on Underscore.js 1.4.3, copyright 2009-2013 Jeremy Ashkenas,
|
||||
DocumentCloud Inc. <http://underscorejs.org/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
276
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md
generated
vendored
276
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/README.md
generated
vendored
|
@ -1,276 +0,0 @@
|
|||
# Lo-Dash <sup>v1.0.1</sup>
|
||||
[![build status](https://secure.travis-ci.org/bestiejs/lodash.png)](http://travis-ci.org/bestiejs/lodash)
|
||||
|
||||
An alternative to Underscore.js, delivering consistency, [customization](https://github.com/bestiejs/lodash#custom-builds), [performance](http://lodash.com/benchmarks), and [extra features](https://github.com/bestiejs/lodash#features).
|
||||
|
||||
## Download
|
||||
|
||||
* Lo-Dash builds (for modern environments):<br>
|
||||
[Development](https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.js) and
|
||||
[Production](https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.min.js)
|
||||
|
||||
* Lo-Dash compatibility builds (for legacy and modern environments):<br>
|
||||
[Development](https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.compat.js) and
|
||||
[Production](https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.compat.min.js)
|
||||
|
||||
* Underscore compatibility builds:<br>
|
||||
[Development](https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.underscore.js) and
|
||||
[Production](https://raw.github.com/bestiejs/lodash/v1.0.1/dist/lodash.underscore.min.js)
|
||||
|
||||
* CDN copies of ≤ v1.0.1’s builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/):<br>
|
||||
[Lo-Dash dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.js),
|
||||
[Lo-Dash prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.min.js),<br>
|
||||
[Lo-Dash compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.compat.js),
|
||||
[Lo-Dash compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.compat.min.js),<br>
|
||||
[Underscore compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.underscore.js), and
|
||||
[Underscore compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.0.1/lodash.underscore.min.js)
|
||||
|
||||
* For optimal file size, [create a custom build](https://github.com/bestiejs/lodash#custom-builds) with only the features you need
|
||||
|
||||
## Dive in
|
||||
|
||||
We’ve got [API docs](http://lodash.com/docs), [benchmarks](http://lodash.com/benchmarks), and [unit tests](http://lodash.com/tests).
|
||||
|
||||
For a list of upcoming features, check out our [roadmap](https://github.com/bestiejs/lodash/wiki/Roadmap).
|
||||
|
||||
## Resources
|
||||
|
||||
For more information check out these articles, screencasts, and other videos over Lo-Dash:
|
||||
|
||||
* Posts
|
||||
- [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/)
|
||||
|
||||
* Videos
|
||||
- [Introducing Lo-Dash](https://vimeo.com/44154599)
|
||||
- [Lo-Dash optimizations and custom builds](https://vimeo.com/44154601)
|
||||
- [Lo-Dash’s origin and why it’s a better utility belt](https://vimeo.com/44154600)
|
||||
- [Unit testing in Lo-Dash](https://vimeo.com/45865290)
|
||||
- [Lo-Dash’s approach to native method use](https://vimeo.com/48576012)
|
||||
- [CascadiaJS: Lo-Dash for a better utility belt](http://www.youtube.com/watch?v=dpPy4f_SeEk)
|
||||
|
||||
## Features
|
||||
|
||||
* AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.)
|
||||
* [_(…)](http://lodash.com/docs#_) supports intuitive chaining
|
||||
* [_.at](http://lodash.com/docs#at) for cherry-picking collection values
|
||||
* [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”* defined](http://michaux.ca/articles/lazy-function-definition-pattern) methods
|
||||
* [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays and objects
|
||||
* [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` argument
|
||||
* [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early
|
||||
* [_.forIn](http://lodash.com/docs#forIn) for iterating over an object’s own and inherited properties
|
||||
* [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an object’s own properties
|
||||
* [_.isPlainObject](http://lodash.com/docs#isPlainObject) checks if values are created by the `Object` constructor
|
||||
* [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend)
|
||||
* [_.partial](http://lodash.com/docs#partial) and [_.partialRight](http://lodash.com/docs#partialRight) for partial application without `this` binding
|
||||
* [_.template](http://lodash.com/docs#template) supports [*“imports”* options](http://lodash.com/docs#templateSettings_imports), [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6), and [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl)
|
||||
* [_.where](http://lodash.com/docs#where) supports deep object comparisons
|
||||
* [_.clone](http://lodash.com/docs#clone), [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick),
|
||||
[and more…](http://lodash.com/docs "_.assign, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept `callback` and `thisArg` arguments
|
||||
* [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray),
|
||||
[and more…](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.some, _.sortBy, _.where") accept strings
|
||||
* [_.filter](http://lodash.com/docs#filter), [_.find](http://lodash.com/docs#find), [_.map](http://lodash.com/docs#map),
|
||||
[and more…](http://lodash.com/docs "_.countBy, _.every, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* and *“_.where”* `callback` shorthands
|
||||
|
||||
## Support
|
||||
|
||||
Lo-Dash has been tested in at least Chrome 5~24, Firefox 1~18, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.8.20, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5.
|
||||
|
||||
## Custom builds
|
||||
|
||||
Custom builds make it easy to create lightweight versions of Lo-Dash containing only the methods you need.
|
||||
To top it off, we handle all method dependency and alias mapping for you.
|
||||
|
||||
* Backbone builds, with only methods required by Backbone, may be created using the `backbone` modifier argument.
|
||||
```bash
|
||||
lodash backbone
|
||||
```
|
||||
|
||||
* CSP builds, supporting default [Content Security Policy](https://dvcs.w3.org/hg/content-security-policy/raw-file/tip/csp-specification.dev.html) restrictions, may be created using the `csp` modifier argument.
|
||||
The `csp` modifier is an alais of the `mobile` modifier. Lo-Dash may be used in Chrome extensions by using either the `csp`, `mobile`, or `underscore` build and using precompiled templates, or loading Lo-Dash in a [sandbox](http://developer.chrome.com/stable/extensions/sandboxingEval.html).
|
||||
```bash
|
||||
lodash csp
|
||||
```
|
||||
|
||||
* Legacy builds, tailored for older environments without [ES5 support](http://es5.github.com/), may be created using the `legacy` modifier argument.
|
||||
```bash
|
||||
lodash legacy
|
||||
```
|
||||
|
||||
* Modern builds, tailored for newer environments with ES5 support, may be created using the `modern` modifier argument.
|
||||
```bash
|
||||
lodash modern
|
||||
```
|
||||
|
||||
* Mobile builds, without method compilation and most bug fixes for old browsers, may be created using the `mobile` modifier argument.
|
||||
```bash
|
||||
lodash mobile
|
||||
```
|
||||
|
||||
* Strict builds, with `_.bindAll`, `_.defaults`, and `_.extend` in [strict mode](http://es5.github.com/#C), may be created using the `strict` modifier argument.
|
||||
```bash
|
||||
lodash strict
|
||||
```
|
||||
|
||||
* Underscore builds, tailored for projects already using Underscore, may be created using the `underscore` modifier argument.
|
||||
```bash
|
||||
lodash underscore
|
||||
```
|
||||
|
||||
Custom builds may be created using the following commands:
|
||||
|
||||
* Use the `category` argument to pass comma separated categories of methods to include in the build.<br>
|
||||
Valid categories (case-insensitive) are *“arrays”*, *“chaining”*, *“collections”*, *“functions”*, *“objects”*, and *“utilities”*.
|
||||
```bash
|
||||
lodash category=collections,functions
|
||||
lodash category="collections, functions"
|
||||
```
|
||||
|
||||
* Use the `exports` argument to pass comma separated names of ways to export the `LoDash` function.<br>
|
||||
Valid exports are *“amd”*, *“commonjs”*, *“global”*, *“node”*, and *“none”*.
|
||||
```bash
|
||||
lodash exports=amd,commonjs,node
|
||||
lodash exports="amd, commonjs, node"
|
||||
```
|
||||
|
||||
* Use the `iife` argument to specify code to replace the immediately-invoked function expression that wraps Lo-Dash.
|
||||
```bash
|
||||
lodash iife="!function(window,undefined){%output%}(this)"
|
||||
```
|
||||
|
||||
* Use the `include` argument to pass comma separated method/category names to include in the build.
|
||||
```bash
|
||||
lodash include=each,filter,map
|
||||
lodash include="each, filter, map"
|
||||
```
|
||||
|
||||
* Use the `minus` argument to pass comma separated method/category names to remove from those included in the build.
|
||||
```bash
|
||||
lodash underscore minus=result,shuffle
|
||||
lodash underscore minus="result, shuffle"
|
||||
```
|
||||
|
||||
* Use the `plus` argument to pass comma separated method/category names to add to those included in the build.
|
||||
```bash
|
||||
lodash backbone plus=random,template
|
||||
lodash backbone plus="random, template"
|
||||
```
|
||||
|
||||
* Use the `template` argument to pass the file path pattern used to match template files to precompile.
|
||||
```bash
|
||||
lodash template="./*.jst"
|
||||
```
|
||||
|
||||
* Use the `settings` argument to pass the template settings used when precompiling templates.
|
||||
```bash
|
||||
lodash settings="{interpolate:/\{\{([\s\S]+?)\}\}/g}"
|
||||
```
|
||||
|
||||
* Use the `moduleId` argument to specify the AMD module ID of Lo-Dash, which defaults to “lodash”, used by precompiled templates.
|
||||
```bash
|
||||
lodash moduleId="underscore"
|
||||
```
|
||||
|
||||
All arguments, except `legacy` with `csp`, `mobile`, `modern`, or `underscore`, may be combined.<br>
|
||||
Unless specified by `-o` or `--output`, all files created are saved to the current working directory.
|
||||
|
||||
The following options are also supported:
|
||||
|
||||
* `-c`, `--stdout` ......... Write output to standard output
|
||||
* `-d`, `--debug` ........... Write only the non-minified development output
|
||||
* `-h`, `--help` ............. Display help information
|
||||
* `-m`, `--minify` ......... Write only the minified production output
|
||||
* `-o`, `--output` ......... Write output to a given path/filename
|
||||
* `-p`, `--source-map` .. Generate a source map for the minified output, using an optional source map URL
|
||||
* `-s`, `--silent` ......... Skip status updates normally logged to the console
|
||||
* `-V`, `--version` ....... Output current version of Lo-Dash
|
||||
|
||||
The `lodash` command-line utility is available when Lo-Dash is installed as a global package (i.e. `npm install -g lodash`).
|
||||
|
||||
## Installation and usage
|
||||
|
||||
In browsers:
|
||||
|
||||
```html
|
||||
<script src="lodash.js"></script>
|
||||
```
|
||||
|
||||
Using [`npm`](http://npmjs.org/):
|
||||
|
||||
```bash
|
||||
npm install lodash
|
||||
|
||||
npm install -g lodash
|
||||
npm link lodash
|
||||
```
|
||||
|
||||
To avoid potential issues, update `npm` before installing Lo-Dash:
|
||||
|
||||
```bash
|
||||
npm install npm -g
|
||||
```
|
||||
|
||||
In [Node.js](http://nodejs.org/) and [RingoJS v0.8.0+](http://ringojs.org/):
|
||||
|
||||
```js
|
||||
var _ = require('lodash');
|
||||
|
||||
// or as a drop-in replacement for Underscore
|
||||
var _ = require('lodash/lodash.underscore');
|
||||
```
|
||||
|
||||
**Note:** If Lo-Dash is installed globally, run [`npm link lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory before requiring it.
|
||||
|
||||
In [RingoJS v0.7.0-](http://ringojs.org/):
|
||||
|
||||
```js
|
||||
var _ = require('lodash')._;
|
||||
```
|
||||
|
||||
In [Rhino](http://www.mozilla.org/rhino/):
|
||||
|
||||
```js
|
||||
load('lodash.js');
|
||||
```
|
||||
|
||||
In an AMD loader like [RequireJS](http://requirejs.org/):
|
||||
|
||||
```js
|
||||
require({
|
||||
'paths': {
|
||||
'underscore': 'path/to/lodash'
|
||||
}
|
||||
},
|
||||
['underscore'], function(_) {
|
||||
console.log(_.VERSION);
|
||||
});
|
||||
```
|
||||
|
||||
## Release Notes
|
||||
|
||||
### <sup>v1.0.1</sup>
|
||||
|
||||
* Add support for specifying source map URLs in `-p`/`--source-map` build options
|
||||
* Ensured the second argument passed to `_.assign` is not treated as a `callback`
|
||||
* Ensured `-p`/`--source-map` build options correctly set the `sourceMappingURL`
|
||||
* Made `-p`/`--source-map` build options set source map *“sources”* keys based on the builds performed
|
||||
* Made `_.defer` use `setImmediate`, in Node.js, when available
|
||||
* Made `_.where` search arrays for values regardless of their index position
|
||||
* Removed dead code from `_.template`
|
||||
|
||||
The full changelog is available [here](https://github.com/bestiejs/lodash/wiki/Changelog).
|
||||
|
||||
## BestieJS
|
||||
|
||||
Lo-Dash is part of the BestieJS *“Best in Class”* module collection. This means we promote solid browser/environment support, ES5 precedents, unit testing, and plenty of documentation.
|
||||
|
||||
## Author
|
||||
|
||||
* [John-David Dalton](http://allyoucanleet.com/)
|
||||
[![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter")
|
||||
|
||||
## Contributors
|
||||
|
||||
* [Kit Cambridge](http://kitcambridge.github.com/)
|
||||
[![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter")
|
||||
* [Mathias Bynens](http://mathiasbynens.be/)
|
||||
[![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](https://twitter.com/mathias "Follow @mathias on Twitter")
|
3590
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/doc/README.md
generated
vendored
3590
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/doc/README.md
generated
vendored
File diff suppressed because it is too large
Load diff
60
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json
generated
vendored
60
Phaser/node_modules/grunt/node_modules/findup-sync/node_modules/lodash/package.json
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -1,3 +0,0 @@
|
|||
<ul>
|
||||
<% _.forEach(people, function(name) { %><li><%- name %></li><% }); %>
|
||||
</ul>
|
|
@ -1 +0,0 @@
|
|||
<% print("Hello " + epithet); %>.
|
|
@ -1 +0,0 @@
|
|||
Hello ${ name }!
|
|
@ -1 +0,0 @@
|
|||
Hello {{ name }}!
|
|
@ -1,20 +0,0 @@
|
|||
Copyright 2011-2013 John-David Dalton <http://allyoucanleet.com/>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,58 +0,0 @@
|
|||
# QUnit CLIB <sup>v1.2.0</sup>
|
||||
## command-line interface boilerplate
|
||||
|
||||
QUnit CLIB helps extend QUnit's CLI support to many common CLI environments.
|
||||
|
||||
## Screenshot
|
||||
|
||||
![QUnit CLIB brings QUnit to your favorite shell.](http://i.imgur.com/jpu9l.png)
|
||||
|
||||
## Support
|
||||
|
||||
QUnit CLIB has been tested in at least Node.js 0.4.8-0.8.19, Narwhal v0.3.2, PhantomJS 1.8.1, RingoJS v0.9, and Rhino v1.7RC5.
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
(function(window) {
|
||||
|
||||
// use a single "load" function
|
||||
var load = typeof require == 'function' ? require : window.load;
|
||||
|
||||
// load QUnit and CLIB if needed
|
||||
var QUnit =
|
||||
window.QUnit || (
|
||||
window.addEventListener || (window.addEventListener = Function.prototype),
|
||||
window.setTimeout || (window.setTimeout = Function.prototype),
|
||||
window.QUnit = load('path/to/qunit.js') || window.QUnit,
|
||||
load('path/to/qunit-clib.js'),
|
||||
window.addEventListener === Function.prototype && delete window.addEventListener,
|
||||
window.QUnit
|
||||
);
|
||||
|
||||
// explicitly call `QUnit.module()` instead of `module()`
|
||||
// in case we are in a CLI environment
|
||||
QUnit.module('A Test Module');
|
||||
|
||||
test('A Test', function() {
|
||||
// ...
|
||||
});
|
||||
|
||||
// must call `QUnit.start()` if using QUnit < 1.3.0 with Node.js or any
|
||||
// version of QUnit with Narwhal, PhantomJS, Rhino, or RingoJS
|
||||
if (!window.document) {
|
||||
QUnit.start();
|
||||
}
|
||||
}(typeof global == 'object' && global || this));
|
||||
```
|
||||
|
||||
## Footnotes
|
||||
|
||||
1. QUnit v1.3.0 does not work with Narwhal or Ringo < v0.8.0
|
||||
|
||||
2. Rhino v1.7RC4 does not support timeout fallbacks `clearTimeout` and `setTimeout`
|
||||
|
||||
## Author
|
||||
|
||||
* [John-David Dalton](http://allyoucanleet.com/)
|
||||
[![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](https://twitter.com/jdalton "Follow @jdalton on Twitter")
|
|
@ -1,62 +0,0 @@
|
|||
[QUnit](http://qunitjs.com) - A JavaScript Unit Testing framework.
|
||||
================================
|
||||
|
||||
QUnit is a powerful, easy-to-use, JavaScript test suite. It's used by the jQuery
|
||||
project to test its code and plugins but is capable of testing any generic
|
||||
JavaScript code (and even capable of testing JavaScript code on the server-side).
|
||||
|
||||
QUnit is especially useful for regression testing: Whenever a bug is reported,
|
||||
write a test that asserts the existence of that particular bug. Then fix it and
|
||||
commit both. Every time you work on the code again, run the tests. If the bug
|
||||
comes up again - a regression - you'll spot it immediately and know how to fix
|
||||
it, because you know what code you just changed.
|
||||
|
||||
Having good unit test coverage makes safe refactoring easy and cheap. You can
|
||||
run the tests after each small refactoring step and always know what change
|
||||
broke something.
|
||||
|
||||
QUnit is similar to other unit testing frameworks like JUnit, but makes use of
|
||||
the features JavaScript provides and helps with testing code in the browser, e.g.
|
||||
with its stop/start facilities for testing asynchronous code.
|
||||
|
||||
If you are interested in helping developing QUnit, you are in the right place.
|
||||
For related discussions, visit the
|
||||
[QUnit and Testing forum](http://forum.jquery.com/qunit-and-testing).
|
||||
|
||||
Development
|
||||
-----------
|
||||
|
||||
To submit patches, fork the repository, create a branch for the change. Then implement
|
||||
the change, run `grunt` to lint and test it, then commit, push and create a pull request.
|
||||
|
||||
Include some background for the change in the commit message and `Fixes #nnn`, referring
|
||||
to the issue number you're addressing.
|
||||
|
||||
To run `grunt`, you need `node` and `npm`, then `npm install grunt -g`. That gives you a global
|
||||
grunt binary. For additional grunt tasks, also run `npm install`.
|
||||
|
||||
Releases
|
||||
--------
|
||||
|
||||
Install git-extras and run `git changelog` to update History.md.
|
||||
Update qunit/qunit.js|css and package.json to the release version, commit and
|
||||
tag, update them again to the next version, commit and push commits and tags
|
||||
(`git push --tags origin master`).
|
||||
|
||||
Put the 'v' in front of the tag, e.g. `v1.8.0`. Clean up the changelog, removing merge commits
|
||||
or whitespace cleanups.
|
||||
|
||||
To upload to code.jquery.com (replace $version accordingly), ssh to code.origin.jquery.com:
|
||||
|
||||
cp qunit/qunit.js /var/www/html/code.jquery.com/qunit/qunit-$version.js
|
||||
cp qunit/qunit.css /var/www/html/code.jquery.com/qunit/qunit-$version.css
|
||||
|
||||
Then update /var/www/html/code.jquery.com/index.html and purge it with:
|
||||
|
||||
curl -s http://code.origin.jquery.com/?reload
|
||||
|
||||
Update web-base-template to link to those files for qunitjs.com.
|
||||
|
||||
Publish to npm via
|
||||
|
||||
npm publish
|
|
@ -1,50 +0,0 @@
|
|||
# node-tar
|
||||
|
||||
Tar for Node.js.
|
||||
|
||||
## Goals of this project
|
||||
|
||||
1. Be able to parse and reasonably extract the contents of any tar file
|
||||
created by any program that creates tar files, period.
|
||||
|
||||
At least, this includes every version of:
|
||||
|
||||
* bsdtar
|
||||
* gnutar
|
||||
* solaris posix tar
|
||||
* Joerg Schilling's star ("Schilly tar")
|
||||
|
||||
2. Create tar files that can be extracted by any of the following tar
|
||||
programs:
|
||||
|
||||
* bsdtar/libarchive version 2.6.2
|
||||
* gnutar 1.15 and above
|
||||
* SunOS Posix tar
|
||||
* Joerg Schilling's star ("Schilly tar")
|
||||
|
||||
3. 100% test coverage. Speed is important. Correctness is slightly
|
||||
more important.
|
||||
|
||||
4. Create the kind of tar interface that Node users would want to use.
|
||||
|
||||
5. Satisfy npm's needs for a portable tar implementation with a
|
||||
JavaScript interface.
|
||||
|
||||
6. No excuses. No complaining. No tolerance for failure.
|
||||
|
||||
## But isn't there already a tar.js?
|
||||
|
||||
Yes, there are a few. This one is going to be better, and it will be
|
||||
fanatically maintained, because npm will depend on it.
|
||||
|
||||
That's why I need to write it from scratch. Creating and extracting
|
||||
tarballs is such a large part of what npm does, I simply can't have it
|
||||
be a black box any longer.
|
||||
|
||||
## Didn't you have something already? Where'd it go?
|
||||
|
||||
It's in the "old" folder. It's not functional. Don't use it.
|
||||
|
||||
It was a useful exploration to learn the issues involved, but like most
|
||||
software of any reasonable complexity, node-tar won't be useful until
|
||||
it's been written at least 3 times.
|
|
@ -1,25 +0,0 @@
|
|||
Copyright (c) Isaac Z. Schlueter
|
||||
All rights reserved.
|
||||
|
||||
The BSD License
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,14 +0,0 @@
|
|||
# block-stream
|
||||
|
||||
A stream of blocks.
|
||||
|
||||
Write data into it, and it'll output data in buffer blocks the size you
|
||||
specify, padding with zeroes if necessary.
|
||||
|
||||
```javascript
|
||||
var block = new BlockStream(512)
|
||||
fs.createReadStream("some-file").pipe(block)
|
||||
block.pipe(fs.createWriteStream("block-file"))
|
||||
```
|
||||
|
||||
When `.end()` or `.flush()` is called, it'll pad the block with zeroes.
|
|
@ -1,25 +0,0 @@
|
|||
Copyright (c) Isaac Z. Schlueter
|
||||
All rights reserved.
|
||||
|
||||
The BSD License
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
||||
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
||||
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,76 +0,0 @@
|
|||
Like FS streams, but with stat on them, and supporting directories and
|
||||
symbolic links, as well as normal files. Also, you can use this to set
|
||||
the stats on a file, even if you don't change its contents, or to create
|
||||
a symlink, etc.
|
||||
|
||||
So, for example, you can "write" a directory, and it'll call `mkdir`. You
|
||||
can specify a uid and gid, and it'll call `chown`. You can specify a
|
||||
`mtime` and `atime`, and it'll call `utimes`. You can call it a symlink
|
||||
and provide a `linkpath` and it'll call `symlink`.
|
||||
|
||||
Note that it won't automatically resolve symbolic links. So, if you
|
||||
call `fstream.Reader('/some/symlink')` then you'll get an object
|
||||
that stats and then ends immediately (since it has no data). To follow
|
||||
symbolic links, do this: `fstream.Reader({path:'/some/symlink', follow:
|
||||
true })`.
|
||||
|
||||
There are various checks to make sure that the bytes emitted are the
|
||||
same as the intended size, if the size is set.
|
||||
|
||||
## Examples
|
||||
|
||||
```javascript
|
||||
fstream
|
||||
.Writer({ path: "path/to/file"
|
||||
, mode: 0755
|
||||
, size: 6
|
||||
})
|
||||
.write("hello\n")
|
||||
.end()
|
||||
```
|
||||
|
||||
This will create the directories if they're missing, and then write
|
||||
`hello\n` into the file, chmod it to 0755, and assert that 6 bytes have
|
||||
been written when it's done.
|
||||
|
||||
```javascript
|
||||
fstream
|
||||
.Writer({ path: "path/to/file"
|
||||
, mode: 0755
|
||||
, size: 6
|
||||
, flags: "a"
|
||||
})
|
||||
.write("hello\n")
|
||||
.end()
|
||||
```
|
||||
|
||||
You can pass flags in, if you want to append to a file.
|
||||
|
||||
```javascript
|
||||
fstream
|
||||
.Writer({ path: "path/to/symlink"
|
||||
, linkpath: "./file"
|
||||
, SymbolicLink: true
|
||||
, mode: "0755" // octal strings supported
|
||||
})
|
||||
.end()
|
||||
```
|
||||
|
||||
If isSymbolicLink is a function, it'll be called, and if it returns
|
||||
true, then it'll treat it as a symlink. If it's not a function, then
|
||||
any truish value will make a symlink, or you can set `type:
|
||||
'SymbolicLink'`, which does the same thing.
|
||||
|
||||
Note that the linkpath is relative to the symbolic link location, not
|
||||
the parent dir or cwd.
|
||||
|
||||
```javascript
|
||||
fstream
|
||||
.Reader("path/to/dir")
|
||||
.pipe(fstream.Writer("path/to/other/dir"))
|
||||
```
|
||||
|
||||
This will do like `cp -Rp path/to/dir path/to/other/dir`. If the other
|
||||
dir exists and isn't a directory, then it'll emit an error. It'll also
|
||||
set the uid, gid, mode, etc. to be identical. In this way, it's more
|
||||
like `rsync -a` than simply a copy.
|
|
@ -1,23 +0,0 @@
|
|||
Copyright 2009, 2010, 2011 Isaac Z. Schlueter.
|
||||
All rights reserved.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
|
@ -1,5 +0,0 @@
|
|||
Just like node's `fs` module, but it does an incremental back-off when
|
||||
EMFILE is encountered.
|
||||
|
||||
Useful in asynchronous situations where one needs to try to open lots
|
||||
and lots of files.
|
|
@ -1,51 +0,0 @@
|
|||
A dead simple way to do inheritance in JS.
|
||||
|
||||
var inherits = require("inherits")
|
||||
|
||||
function Animal () {
|
||||
this.alive = true
|
||||
}
|
||||
Animal.prototype.say = function (what) {
|
||||
console.log(what)
|
||||
}
|
||||
|
||||
inherits(Dog, Animal)
|
||||
function Dog () {
|
||||
Dog.super.apply(this)
|
||||
}
|
||||
Dog.prototype.sniff = function () {
|
||||
this.say("sniff sniff")
|
||||
}
|
||||
Dog.prototype.bark = function () {
|
||||
this.say("woof woof")
|
||||
}
|
||||
|
||||
inherits(Chihuahua, Dog)
|
||||
function Chihuahua () {
|
||||
Chihuahua.super.apply(this)
|
||||
}
|
||||
Chihuahua.prototype.bark = function () {
|
||||
this.say("yip yip")
|
||||
}
|
||||
|
||||
// also works
|
||||
function Cat () {
|
||||
Cat.super.apply(this)
|
||||
}
|
||||
Cat.prototype.hiss = function () {
|
||||
this.say("CHSKKSS!!")
|
||||
}
|
||||
inherits(Cat, Animal, {
|
||||
meow: function () { this.say("miao miao") }
|
||||
})
|
||||
Cat.prototype.purr = function () {
|
||||
this.say("purr purr")
|
||||
}
|
||||
|
||||
|
||||
var c = new Chihuahua
|
||||
assert(c instanceof Chihuahua)
|
||||
assert(c instanceof Dog)
|
||||
assert(c instanceof Animal)
|
||||
|
||||
The actual function is laughably small. 10-lines small.
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue