Preparing new tests

This commit is contained in:
Richard Davey
2013-05-29 02:58:56 +01:00
parent 3c0c349089
commit 09f57fa346
237 changed files with 13385 additions and 34447 deletions
+77 -1
View File
@@ -25,6 +25,37 @@ module Phaser.FX.Camera {
}
}
/**
* Phaser - FX - Camera - Border
*
* Creates a border around a camera.
*/
module Phaser.FX.Camera {
class Border {
constructor(game: Game, parent: Camera);
private _game;
private _parent;
/**
* Whether render border of this camera or not. (default is false)
* @type {boolean}
*/
public showBorder: bool;
/**
* Color of border of this camera. (in css color string)
* @type {string}
*/
public borderColor: string;
/**
* You can name the function that starts the effect whatever you like, but we used 'start' in our effects.
*/
public start(): void;
/**
* 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): void;
}
}
/**
* Phaser - FX - Camera - Template
*
* A Template FX file you can use to create your own Camera FX.
@@ -92,7 +123,7 @@ module Phaser.FX.Camera {
* This is the rectangular region to grab from the Camera used in the Mirror effect
* It is rendered to the Stage at Mirror.x/y (note the use of Stage coordinates, not World coordinates)
*/
public start(x: number, y: number, region: Quad, fillColor?: string): void;
public start(x: number, y: number, region: Rectangle, fillColor?: string): void;
/**
* 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.
@@ -101,6 +132,51 @@ module Phaser.FX.Camera {
}
}
/**
* Phaser - FX - Camera - Shadow
*
* Creates a drop-shadow effect on the camera window.
*/
module Phaser.FX.Camera {
class Shadow {
constructor(game: Game, parent: Camera);
private _game;
private _parent;
/**
* Render camera shadow or not. (default is false)
* @type {boolean}
*/
public showShadow: bool;
/**
* Color of shadow, in css color string.
* @type {string}
*/
public shadowColor: string;
/**
* Blur factor of shadow.
* @type {number}
*/
public shadowBlur: number;
/**
* Offset of the shadow from camera's position.
* @type {Point}
*/
public shadowOffset: Point;
/**
* You can name the function that starts the effect whatever you like, but we used 'start' in our effects.
*/
public start(): void;
/**
* 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): void;
/**
* 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): void;
}
}
/**
* Phaser - FX - Camera - Scanlines
*
* Give your game that classic retro feel!
+16 -28
View File
@@ -1,8 +1,7 @@
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Flash
*
@@ -73,9 +72,7 @@ var Phaser;
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/system/Camera.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Border
*
@@ -110,7 +107,7 @@ var Phaser;
if(this.showBorder == true) {
this._game.stage.context.strokeStyle = this.borderColor;
this._game.stage.context.lineWidth = 1;
this._game.stage.context.rect(this._sx, this._sy, this.worldView.width, this.worldView.height);
this._game.stage.context.rect(camera.scaledX, camera.scaledY, camera.worldView.width, camera.worldView.height);
this._game.stage.context.stroke();
}
};
@@ -125,9 +122,7 @@ var Phaser;
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/system/Camera.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Template
*
@@ -183,9 +178,7 @@ var Phaser;
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/system/Camera.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Mirror
*
@@ -228,9 +221,10 @@ var Phaser;
* It happens directly BEFORE a canvas context.restore has happened if added to a Camera.
*/
function (camera, cameraX, cameraY, cameraWidth, cameraHeight) {
if(this.cls) {
this._context.clearRect(0, 0, this._mirrorWidth, this._mirrorHeight);
}
//if (this.cls)
//{
// this._context.clearRect(0, 0, this._mirrorWidth, this._mirrorHeight);
//}
this._sx = cameraX + this._mirrorX;
this._sy = cameraY + this._mirrorY;
if(this.flipX == true && this.flipY == false) {
@@ -273,9 +267,7 @@ var Phaser;
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/system/Camera.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Shadow
*
@@ -301,9 +293,9 @@ var Phaser;
this.shadowBlur = 10;
/**
* Offset of the shadow from camera's position.
* @type {MicroPoint}
* @type {Point}
*/
this.shadowOffset = new Phaser.MicroPoint(4, 4);
this.shadowOffset = new Phaser.Point(4, 4);
this._game = game;
this._parent = parent;
}
@@ -347,9 +339,7 @@ var Phaser;
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/system/Camera.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Scanlines
*
@@ -380,8 +370,7 @@ var Phaser;
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Shake
*
@@ -393,7 +382,7 @@ var Phaser;
this._fxShakeIntensity = 0;
this._fxShakeDuration = 0;
this._fxShakeComplete = null;
this._fxShakeOffset = new Phaser.MicroPoint(0, 0);
this._fxShakeOffset = new Phaser.Point(0, 0);
this._fxShakeDirection = 0;
this._fxShakePrevX = 0;
this._fxShakePrevY = 0;
@@ -473,8 +462,7 @@ var Phaser;
var Phaser;
(function (Phaser) {
(function (FX) {
/// <reference path="../../Phaser/Game.d.ts" />
/// <reference path="../../Phaser/FXManager.d.ts" />
/// <reference path="../../build/phaser.d.ts" />
/**
* Phaser - FX - Camera - Fade
*
+3636 -6553
View File
File diff suppressed because it is too large Load Diff
+1418 -2113
View File
File diff suppressed because it is too large Load Diff