Commit graph

1370 commits

Author SHA1 Message Date
photonstorm
1c68ff9042 Tilemap.createFromObjects allows you to specify you own object type to be created if you want a class that extends Phaser.Sprite. 2014-03-07 03:19:07 +00:00
photonstorm
a51ae03246 Tweens are now bound to their own TweenManager, not always the global game one. So you can create your own managers now (for you clark :) 2014-03-07 01:26:09 +00:00
photonstorm
3b2573de9a Objects that are 'fixedToCamera' are now still correctly placed even if the camera is scaled (#512) 2014-03-06 17:12:12 +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
7db8e5bc5e Fixed typo in README (thanks prtksxna, #518) 2014-03-06 16:56:25 +00:00
photonstorm
d75f6e163f Updated tilemap type to string (fixes #516) 2014-03-06 16:53:52 +00:00
photonstorm
081c083176 InputHandler.enableSnap now correctly assigns the snap offset parameters (fixes #515) 2014-03-06 16:45:29 +00:00
clark-stevenson
83091b7647 Phaser.Image extends PIXI.Sprite 2014-03-06 11:44:26 +00:00
photonstorm
512b542e50 Fixed gruntfile and included new labs demo. 2014-03-06 10:01:46 +00:00
photonstorm
6815c5909a New tiles and new map test. 2014-03-06 09:48:42 +00:00
photonstorm
e97a207816 Added in Circle to the Ninja physics system. 2014-03-06 07:18:59 +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
2bab4fd2fb Testing lines. 2014-03-05 04:40:37 +00:00
photonstorm
12a2a2ec16 Testing map collision 2014-03-05 03:18:24 +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
photonstorm
cc82336952 Adding in TweenGroup for wip dev. 2014-03-04 03:31:20 +00:00
photonstorm
5a6ae5f696 Tilemap.putTile now correctly re-calculates the collision data based on the new collideIndexes array (fixes #371)
Tilemap.putTile can now insert a tile into a null/blank area of the map (before it could only replace existing tiles)
2014-03-04 03:08:35 +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
f9cad58082 Labs code updates. 2014-03-04 01:40:02 +00:00
photonstorm
a30c2c87a9 New build files. 2014-03-04 01:29:04 +00:00
photonstorm
8c2502d37d Group.xy(index, x, y) allows you to set the x and y coordinates of a Group child at the given index.
Group.reverse() reverses the display order of all children in the Group.
New labs demo.
Fixed some Easing docs issues.
2014-03-04 01:27:57 +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
67ad898294 Tween.generateData(frameRate) allows you to generate tween data into an array, which can then be used however you wish (see new examples)
Added new Retro Font examples.
2014-03-03 22:43:35 +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
6cc09fce67 Updated Pixi to fix roundToPixel error. 2014-03-03 16:13:50 +00:00
photonstorm
833960b3c8 Animation.looped has been renamed to Animation.loop. It's a boolean you can toggle at run-time to turn on/off animation looping.
A single Animation object now has 3 new events: onStart, onLoop and onComplete.
Animation.loopCount holds the number of times the animation has looped since it last started.
Animation.stop has a new parameter: dispatchComplete. If true it'll dispatch an Animation.onComplete event.
2014-03-03 16:05:55 +00:00
photonstorm
4a370c82cf You can now load in CSV Tilemaps again and they get created properly (fixes #391)
You can now create blank Tilemaps and then populate them with data later.
2014-03-03 13:45:47 +00:00
photonstorm
960e8cace6 Updated blank tilemap example with painting tool. 2014-03-03 11:40:40 +00:00
photonstorm
502d74ee39 Keyboard.event now stores the most recent DOM keyboard event. 2014-03-03 11:18:56 +00:00
photonstorm
d8f5832fa2 Completely empty Tilemaps can now be created. This allows for dynamic map generation at runtime.
Loads of updates across most the Tilemap files. Not finished yet, still CSV loading to do and a multi-tileset issue to resolve, but it's a lot more flexible now.
2014-03-03 05:19:46 +00:00
photonstorm
6f513042c1 Tween no longer copies all the object properties into the _valuesStart object on creation.
Fixed shadow bug in Debug.text
Fixed tween examples.
2014-03-03 02:40:59 +00:00
photonstorm
76040d303e Added in the Gestures support contribution for testing. 2014-03-03 01:42:11 +00:00
photonstorm
61376093fd Updated all the examples to use the new Debug methods. 2014-03-03 01:19:31 +00:00
photonstorm
c4a68e3e87 The Debug panel now works in WebGL mode. Pay attention to the warning at the top of the Debug docs (feature request #499)
All the Debug methods have had the word 'render' removed from the start. So where you did `debug.renderSpriteInfo` before, it's now just `debug.spriteInfo`.
Debug methods that rendered geometry (Rectangle, Circle, Line, Point) have been merged into the single method: `Debug.geom`.
2014-03-03 00:46:03 +00:00
photonstorm
418a161b46 Testing webgl debug overlay. 2014-03-02 20:51:44 +00:00
photonstorm
442e6bb776 Events.onInputUp would be dispatched twice if the Sprite had drag enabled, now only dispatched once (thanks Overbryd, fixes #502)
Changed webfont URI back to //
2014-03-02 11:31:26 +00:00
Richard Davey
3794a846d4 Merge pull request #504 from georgiee/fix-single-polygon
Phaser.Physics.Body#loadPolygon
2014-03-02 11:26:31 +00:00
Richard Davey
a7dbd6e626 Merge pull request #498 from alvinsight/1.2
Examples updated
2014-03-02 11:23:59 +00:00
photonstorm
0eb23d4b11 RandomDataGenerator.integerInRange(min, max) now includes both min and max within its range (#501) 2014-03-02 11:21:30 +00:00
photonstorm
52118be088 Sound.onMarkerComplete event is now dispatched when a marker stops. See Sound.onLoop for a looping marker event (thanks registered99, fixes #500) 2014-03-02 11:11:20 +00:00
photonstorm
66bdf56349 The physics world is now cleared on state swap (fixes #505) 2014-03-02 11:04:04 +00:00
photonstorm
33da238e97 Updated pixi.js 2014-03-02 10:58:51 +00:00
photonstorm
7ff4e51ab1 Time.reset does a removeAll on any Timers.
Device no longer things a Windows Phone or Windows Tablet are desktop devices (thanks wombatbuddy, fixes #506)
2014-03-02 10:56:39 +00:00
Georgios Kaleadis
a1bb3ea23b pop first element if there is only one shape 2014-03-01 12:04:30 +01: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
photonstorm
8dcfef8db0 Updated to latest Pixi build (can do away with our own local patch now).
Group.sendToBottom(child) is the handy opposite of Group.bringToTop()
Group.moveUp(child) will move a child up the display list, swapping with the child above it.
Group.moveDown(child) will move a child down the display list, swapping with the child below it.
2014-02-28 18:55:07 +00:00
alvinsight
27cea5e6f0 Tidying up a bit 2014-02-28 18:40:06 +00:00
alvinsight
f17cdd9c32 Updated a lot of examples to Phaser 2.0 :) 2014-02-28 18:22:52 +00:00
photonstorm
bbc0f4a18a Updated grunt script so it can copy the build files to the right location. 2014-02-28 11:12:49 +00:00
photonstorm
8662cd2fd4 Brand new Grunt task - creates each core library as its own file and a combined phaser.js.
New build script now cleanly splits Phaser, Pixi and p2 so they are each UMD wrapped and each available in the global scope (now more requireJS friendly!).
phaser-no-libs.js allows you to use your own version of p2.js or pixi.js with Phaser. Warning: This is totally unsupported. If you hit bugs, you fix them yourself.
Fixed silly instanceof bug in game objects (sorry guys).
2014-02-28 09:30:53 +00:00