Commit graph

335 commits

Author SHA1 Message Date
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
Richard Davey
c3778be394 Merge pull request #607 from clark-stevenson/patch-1
Update phaser.d.ts
2014-03-20 00:21:05 +00:00
photonstorm
684ee9c064 ArcadePhysics.Body has a deltaMax object, which allows you to cap the delta applied to the position to +- this value.
ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608)
2014-03-20 00:20:02 +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
22b472ba4d Removed rogue console.log 2014-03-19 13:23:46 +00:00
photonstorm
2d08fab48e When creating a Sprite (via Group.create or directly) with exists = false and a P2 body, the body is not added to the world.
Every Input class now checks to see if it has already been started. If so it doesn't add the listeners again unless they have been nulled.
2014-03-19 13:22:04 +00:00
photonstorm
4bfbd4dc96 2.0.1-19 build files. 2014-03-19 12:12:59 +00:00
photonstorm
5d40365b87 InputHandler.dragFromCenter will now work regardless of the anchor point of the Sprite. 2014-03-19 05:21:26 +00:00
photonstorm
84df7bf320 Sprite.events.onEnterBounds added. This is dispatched if the Sprite leaves the bounds but then returns. The opposite of onOutOfBounds. 2014-03-19 04:17:37 +00:00
photonstorm
2cc1a45f9a Fixed SpriteBounds camera placement in Debug (again).
Removed un-needed cache vars from ArcadePhysics.World.
Tidied up ArcadePhysics.Body and fixed rotation parameters.
Every single Arcade Physics Example now runs perfectly under this release.
2014-03-19 03:55:44 +00:00
photonstorm
9490041c79 ArcadePhysics.separate doesn't pass over to seperateX/Y if overlapOnly is true (fix #604)
ArcadePhysics.collideSpriteVsSprite checks if both objects have bodies before processing.
2014-03-19 02:05:29 +00:00
photonstorm
df4debf2a6 Build update for testing. 2014-03-19 00:57:10 +00:00
photonstorm
8010d245f1 Fixed Grunt script that stopped the P2 constraint classes from building properly. 2014-03-18 18:36:46 +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
photonstorm
a7ff5f884c Added basic Webcam plugin.
Added Device.getUserMedia detection.
Updated config.php so you can toggle physics engines on/off via flags.
Updated Gruntfile.js so it builds a Phaser + Pixi but no Physics libs.
2014-03-18 15:14:28 +00:00
photonstorm
89cdaef84d New build files. 2014-03-18 00:01:39 +00:00
photonstorm
f32dce8cdd New build files. 2014-03-17 21:18:02 +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
photonstorm
44a5741148 Fixed games. Updated Body.moves handling. 2014-03-14 04:49:55 +00:00
alvinsight
726c42310a Yeaah, 242 examples working, only 7 missing 2014-03-13 17:32:55 +00:00
alvinsight
8a4d5ab8fd Updated all the examples that were using the old physicsEnabled 2014-03-13 17:32:54 +00:00
photonstorm
c2d38fe16b jshint passed all the p2 physics and fixed Debug.spriteBounds. 2014-03-13 16:16:14 +00:00
alvinsight
c9f89f5a3b New examples for ninja physics, bitmap text, and documented the map function 2014-03-13 13:25:39 +00:00
photonstorm
87684bb15f Revolute Constraint done. 2014-03-13 12:14:14 +00:00
photonstorm
6b55fea953 Distance and Gear constraints done. 2014-03-13 11:13: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
83e197772d Moved Time update back into core loop. 2014-03-11 20:30:26 +00: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
13ff8985e1 Merged @georgiee p2 BodyDebug and reformatted for jshint pass. Looks awesome :) #536 2014-03-10 15:25:43 +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
photonstorm
45ab4673cc ScaleManager.fullScreenTarget allows you to change the DOM element that the fullscreen API is called on (feature request #526) 2014-03-10 01:13:01 +00:00
photonstorm
ab6a9aab41 Fresh builds for the weekend. 2014-03-07 15:17:13 +00:00
photonstorm
4db1fc0079 Restored Phaser.QuadTree - should get all remaining Arcade Physics examples working again. 2014-03-07 15:14:53 +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
3e93f24583 New split physics system is implemented. Still tidying-up, but ArcadePhysics, P2 and Ninja Physics are in and configured. Lots more examples required, and tilemap collision mostly broken in Arcade at the moment. Time to implement in Ninja. 2014-03-06 06:29:19 +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
Richard Davey
b5df53b4f6 Merge pull request #507 from clark-stevenson/patch-1
PIXI + Phaser Definitions
2014-03-04 02:05:45 +00:00
photonstorm
a30c2c87a9 New build files. 2014-03-04 01:29:04 +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
7183322259 Renamed Phaser.BitmapFont to Phaser.RetroFont because I believe it will cause confusion otherwise. Also tidied up the asset fonts folder. 2014-03-03 17:05:28 +00:00
photonstorm
76040d303e Added in the Gestures support contribution for testing. 2014-03-03 01:42:11 +00:00
photonstorm
664d5b3e2c Fixed issue where Image, Sprite, etc wouldn't call preUpdate or postUpdate of its children.
Fixed issue where renderOrderID wasn't being assigned correctly, causing the Input Handler to be unable to select the "top" item on a display list (would all default to zero)
Fixed issue where Stage would assign renderOrderIDs in reverse, should be in sequence.
Fixed issue where objects where checking World for the currentRenderOrderID by mistake instead of Stage.
Basically, input handling works a lot better now for Groups and nested objects :)
2014-02-28 19:45:15 +00:00