Commit graph

175 commits

Author SHA1 Message Date
clark-stevenson
30b2b40810 Update IPixiRenderer Interface
Thanks @natelong

Solves
http://www.html5gamedevs.com/topic/1638-changing-game-size-to-fit-page/?p=36922
2014-05-08 13:36:51 +01:00
Maxime Fabre
8d88e08115 Fix type of Tilemap.foreach callback 2014-05-08 01:57:19 +02:00
clark-stevenson
266417e735 Update phaser.d.ts
Past week of updates on dev. 
Note also includes #799
2014-05-04 16:36:58 +01:00
Luis Fonseca
d49a8f1159 Update TypeScript definitions
Made the "index" parameter optional to reflect the JS version.
2014-04-30 15:00:53 +01:00
Franky Lau
4a31db6a64 Update phaser.d.ts
Fix imcompatible override Phaser.Point.clone
2014-04-28 22:12:25 +08:00
clark-stevenson
53da55d6a8 Fixed Emitter.makeParticles optional parameters 2014-04-28 14:23:44 +01:00
clark-stevenson
8b01abfbec BitmapData + Color updates mostly. 2014-04-26 01:34:19 +01:00
photonstorm
0f1e0a3d4e Updated the Device little / big endianess check. 2014-04-23 23:35:36 +01:00
photonstorm
b6cc150a15 Game.scratch is a single handy BitmapData instance that can be used as a visual scratch-pad, for off-screen bitmap manipulation (and is used as such by BitmapData itself).
Updated TS defs.
2014-04-23 22:14:47 +01:00
clark-stevenson
4e2afcc270 Update phaser.d.ts
Fixed typo. I must have been having fun without knowing it.
2014-04-23 10:47:00 +01:00
clark-stevenson
b00e60a996 Update phaser.d.ts
Couple of updates for last week of dev.
2014-04-23 08:26:26 +01:00
photonstorm
4ec5665148 Fixed #750 - Invalid typescript mapping for TileSprite.autoScroll function in TS defs.
Game checks if window.console exists before using it (should fix IE9 issues when dev tools are closed), however it is still used deeper in Pixi.
Body.loadData flagged as deprecated.
2014-04-22 23:31:07 +01:00
photonstorm
e4887c8177 If Tween.yoyo was true but repeat was 0 then it wouldn't yoyo. Now if yoyo is set, but not repeat, the repeat count gets set to 1 (thanks @hilts-vaughan, fix #744) 2014-04-22 02:12:21 +01:00
Dmytrii Shchadei
d8e158ba87 fix wrong definition for Phaser.Point.rotate 2014-04-20 22:42:37 +02:00
qdrj
c8f1a15be2 Fix phaser.d.ts
Add missing semicolons from d.ts file. Now it's working with WebStorm 8.
2014-04-19 12:11:26 +04:00
qdrj
52a2c2612b Revert "Add missing semicolons. Now working with WebStorm 8."
This reverts commit 01b7a5957a.
2014-04-19 12:05:43 +04:00
qdrj
01b7a5957a Add missing semicolons. Now working with WebStorm 8. 2014-04-19 11:53:42 +04:00
clark-stevenson
0063c85c86 Update phaser.d.ts
Recent additions.
2014-04-15 20:11:24 +01:00
photonstorm
5f455791d4 TypeScript defs update (thanks @cheshirepuss42, ping to @clark-stevenson to ensure merge with his master version :) 2014-04-15 03:24:54 +01:00
clark-stevenson
af42813a36 Update phaser.d.ts
#715

Added OnFileStart signal to loader
2014-04-14 11:44:32 +01:00
clark-stevenson
4167e9ab00 Update phaser.d.ts
#95b0532
#770ced8
#780fb48
#a01cc2e
#b7b1e74  <-- Not sure how to handle src/utils/Utils.js Array.prototype.forEach
2014-04-13 19:43:13 +01:00
photonstorm
fab18dd80d Modified Phaser.Animation.generateFrameNames to make it a static function (fix #701) 2014-04-10 04:31:27 +01:00
clark-stevenson
5137834886 generateFrameNames returns string[]
#697
2014-04-09 21:05:07 +01:00
clark-stevenson
d319cd8cb3 Update phaser.d.ts
Updated for last week of dev.
2014-04-03 20:13:35 +01:00
clark-stevenson
6041c137af Small additions from the past week. 2014-03-28 16:58:23 +00:00
photonstorm
953ae83350 Updated TS defs (fix #650) 2014-03-26 13:24:11 +00:00
photonstorm
75cc6a7365 Added World.setBounds to the TypeScript defs (fix #649) 2014-03-26 11:00:15 +00:00
keyle
163d8fa964 Fixed typo in typescript defs 2014-03-26 19:05:36 +10:00
clark-stevenson
daaa99216f Few updates 2014-03-21 23:59:44 +00:00
clark-stevenson
1f37a4e1f5 Update phaser.d.ts
Final one, I went through the source code this time so I know its 99% matching your latest commit brining it upto par with 2 completely.

Congratulations on reaching 2! Phaser is amazing, and without the well documented code, I would be stumped.
2014-03-20 11:07:37 +00:00
photonstorm
634b1d1093 Emitter.friction property removed and replaced with Emitter.particleDrag, which is now correctly applied.
ArcadePhysics.Body.reset incorrectly set the Body.rotation to Sprite.rotation instead of angle.
Emitter.emitParticle resets the rotation on the particle to zero before emitting it.
Lots of fixes to the TypeScript definitions file (thanks as always to clark-stevenson for his tireless work on these)
Emitters now bring the particle they are about to emit to the top of the Group before doing so. Avoids particles hidden behind others.
ArcadePhysics.Body.setSize corrected to take the parameters as positive, not negative values.
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608)
Emitter.particleClass can now be set to any object that extends Phaser.Sprite, which will be emitted instead of a regular Sprite.
2014-03-20 03:48:54 +00:00
clark-stevenson
7ab37a82f4 Update phaser.d.ts
SAT removed
Physics modules should all be updated correctly #599 
Misc updates from the last week of dev. 

So the TS is upto date and it should be easy to maintain with the latest changes. 

The only thing that bothers me is the historic references to <2.0 and the pre-pixi "any". That kind of thing will be my next update.

My final questions though are these!

1) displayObject: any  can this now be considered PIXI.DisplayObject or should I keep "any"?

2) When an argument can either be a string or a number. Are you stuck with "any" or is there a concept I am missing in TypeScript? It is the same with stuff like "p2.Constraint". In this situation, is it wise to create an IConstraint which all constraints implement, rather than having "any" or is that just even more confusing?

I would like my next pass through to be as acceptable as possible.
2014-03-19 15:09:44 +00:00
photonstorm
eec9f70c1c Math.removeRandom allows you to remove (and return) a random object from an array.
Updated TypeScript defs to fix getRandom (fix #583)
2014-03-18 16:51:58 +00:00
clark-stevenson
868f128978 Basic p2 added
Will maybe be sketchy (a few Any's - p2.Shape or p2.Constraint etc). Also I may have messed up a couple of types (Phaser.Physics.p2.Body vs p2.Body).

Also fixed #585
2014-03-17 12:35:14 +00:00
clark-stevenson
1152fe6ee2 Ninja Physics Added 2014-03-16 15:21:22 +00:00
qdrj
33215dce6c fixed lots of "nummber" typos 2014-03-12 14:48:49 +04:00
qdrj
0c3ad8acf4 tiny fix 2014-03-12 13:49:18 +04:00
qdrj
709c4a8111 fix Phaser.Utils.Debug definitions 2014-03-12 13:10:42 +04:00
photonstorm
6ef9e30753 Added z property to remaining game objects and updated TypeScript defs. 2014-03-10 23:16:49 +00:00
clark-stevenson
c2a71cc01c Reviewed for 10/03/2014
This includes the latest changes made to Phaser.d.ts today.  (Body)

I am pretty lost in the whole Physics Body definitions stuff so generally only do limited edits there.
2014-03-10 16:58:12 +00:00
photonstorm
982823d875 Updated TypeScript defs which now compiles against 1.2 (but still missing quite a few areas).
New build files that match them.
2014-03-10 11:08:07 +00:00
photonstorm
8fff38618d Tidied up the Examples, fixed Arcade Physics Body, added Body enable support to Group and fixed QuadTree. 2014-03-10 03:06:28 +00:00
Richard Davey
a6b05f4d02 Merge pull request #519 from clark-stevenson/patch-1
Phaser.Image extends PIXI.Sprite
2014-03-06 16:57:38 +00:00
photonstorm
d75f6e163f Updated tilemap type to string (fixes #516) 2014-03-06 16:53:52 +00:00
clark-stevenson
83091b7647 Phaser.Image extends PIXI.Sprite 2014-03-06 11:44:26 +00:00
photonstorm
22b1ce9b9d Added Phasers new Physics Manager and restored the pre-1.1.4 ArcadePhysics system. The new manager can handle multiple physics systems running in parallel, which could be extremely useful for lots of games. 2014-03-05 02:36:08 +00:00
clark-stevenson
700d8d5258 PIXI + Phaser Definitions
Thanks to @natelong for Maintaining the original PIXI definitions.

Updated to 1.5.2 PIXI. 

Needs testing. May be missing updates from the dev branch of Phaser 1.2 that occurred in the last few days.  

Warning! I made Phaser.point extend PIXI.Point. It was the only way I could get this to work. 

If class property position is PIXI.Point
And you try to overlay position with Phaser.Point

I get "X cannot extend Y type mismatch" for a whole bunch of classes. Only when I extend PIXI.Point does the errors dissapear. 

Also was not sure to include PIXI in this file or a separate one.
2014-03-03 23:46:24 +00:00
photonstorm
1aea08d0f7 AnimationParser.spriteSheet wasn't taking the margin or spacing into account when calculating the numbers of sprites per row/column, nor was it allowing for extra power-of-two padding at the end (fix #482, thanks yig)
AnimationManager.add documentation said that 'frames' could be null, but the code couldn't handle this so it defaults to an empty array if none given (thanks yig)
Also updated TypeScript definitions and StateManager.add docs.
2014-02-26 01:32:38 +00:00
photonstorm
6f835d7696 Added Tileset to TypeScript defs. 2014-02-10 02:42:28 +00:00
clark-stevenson
e9ab2d30b6 Update phaser.d.ts
Sprite was missing height property
2014-02-09 17:00:07 +00:00