Commit graph

2000 commits

Author SHA1 Message Date
Richard Davey
8bc1f99e0c Merge pull request #860 from clark-stevenson/patch-2
Update phaser.d.ts
2014-05-29 22:02:05 +01:00
clark-stevenson
04d9e2e815 Update phaser.d.ts
Fixes #858
2014-05-29 17:50:10 +01:00
photonstorm
3c61e1d24f Build files with Asset Pack support added. 2014-05-29 17:37:28 +01:00
photonstorm
8b4113c245 Updated Asset Pack Format documentation. 2014-05-29 17:37:17 +01:00
photonstorm
5a42a41608 Updated the JSON format. 2014-05-29 17:25:20 +01:00
photonstorm
5b5bdc80d9 Loader.pack will allow you to load in a new Phaser Asset Pack JSON file. An Asset Pack is a specially structured file that allows you to define all assets for your game in an external file. The file can be split into sections, allowing you to control loading a specific set of files from it. An example JSON file can be found in the resources folder and examples of use in the Phaser Examples repository.
Loader.totalQueuedPacks returns the number of Asset Packs in the queue.
Loader.totalLoadedPacks returns the number of Asset Packs already loaded.
2014-05-29 17:05:13 +01:00
photonstorm
4004cc92e3 First working pass at the Asset Pack Loader update. 2014-05-29 15:57:47 +01:00
photonstorm
7de7785250 First draft of the Asset Pack JSON format. 2014-05-29 04:44:35 +01:00
photonstorm
066ab633a6 Loader.tilemap has renamed the mapURL parameter to url and mapData to data to keep it consistent with the other Loader methods.
Loader.physics has renamed the `dataURL` parameter to `url` and `jsonData` to `data` to keep it consistent with the other Loader methods.
2014-05-29 04:44:23 +01:00
photonstorm
af1508de8f BitmapData.addToWorld will create a new Phaser.Image object, assign the BitmapData to be its texture, add it to the world then return it.
BitmapData.copyPixels now accepts a Sprite, Image, BitmapData, HTMLImage or string as its source.
2014-05-29 03:30:21 +01:00
photonstorm
2219e6f1c9 Timer.ms would report the game time ms value if the Timer hadn't yet been started, instead of 0.
Timer.seconds would report the game time value if the Timer hadn't yet been started, instead of 0.
2014-05-28 23:27:26 +01:00
photonstorm
f03445d9aa User guides for the Flash to Phaser JSFL script. 2014-05-28 02:27:25 +01:00
Richard Davey
964f2d45ee Merge pull request #852 from clark-stevenson/patch-1
Update phaser.d.ts
2014-05-28 02:26:58 +01:00
photonstorm
30cf226fc2 Rebuild on offset change. 2014-05-28 01:08:28 +01:00
photonstorm
099b7c1fdc Version 1.0 of the Flash to Phaser JSFL Script. 2014-05-28 01:08:01 +01:00
clark-stevenson
cb3dedd485 Update phaser.d.ts
Updated from last week

Also I think #843 is solved and supports this for example. I do not really see a problem with Casting as I do it fairly frequently. 

`var filter: Phaser.Filter.Marble = new Phaser.Filter.Marble(this.game, 800, 600, 4, 1);`
`var filter: Phaser.Filter.Marble = <Phaser.Filter.Marble>this.game.add.filter("Marble", 800, 600, 4, 1);`
`var filter: Phaser.Filter = this.game.add.filter("Marble", 800, 600, 4, 1);` <-- looses intellisense
2014-05-27 23:47:29 +01:00
John Watson
14e1f0fcc6 Render tilemap when camera outside of world bounds, layer wrapping
Prior to this change, TilemapLayers always restricted themselves to
rendering strictly within the world bounds. If the camera was allowed
to go beyond the world bounds, then the tilemap would appear to stop
scrolling once the camera hit the world edge. This allows the tilemap
to continue scrolling, showing empty space beyond the edge of the map.

Additionally, when the new "wrap" parameter is true, the tilemap will
render its opposite edge in the empty space. This simulates the map as
if it was the surface of a toroid (donut) rather than a flat plane.
2014-05-27 14:51:44 -07:00
photonstorm
0c76e9aada Sprite animation data wasn't reset when going from a sprite sheet to a single frame in Sprite.loadTexture (thanks @lucbloom, fix #850) 2014-05-27 14:23:41 +01:00
photonstorm
5a0d5b4887 RetroFont now uses Phaser.scaleModes.NEAREST by default for its RenderTexture to preserve scaling. 2014-05-27 13:36:38 +01:00
photonstorm
cdde45a292 Phaser.RenderTexture incorrectly passed the scaleMode to Pixi.RenderTexture, causing the renderer to error. 2014-05-27 13:35:47 +01:00
photonstorm
8d94b4a91c Swapped keypress callback order. 2014-05-27 11:32:18 +01:00
photonstorm
9c35dfde0c ArcadePhysics.Body has a new boolean property enable. If false the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself. 2014-05-27 11:22:58 +01:00
photonstorm
5b9bd96583 RetroFont.updateOffset allows you to modify the offsetX/Y values used by the font during rendering. 2014-05-27 05:23:34 +01:00
photonstorm
890d90af4d Keyboard.addCallbacks now has a new parameter for keypress event capture.
Keyboard.pressEvent stores the most recent DOM keypress event.
Keyboard.processKeyDown now runs the callback after all the objects have been created and/or updated.
Keyboard.processKeyUp now runs the callback after all the objects have been created and/or updated.
Phaser.Keyboard.lastChar will return the string value of the last key pressed.
Phaser.Keyboard.lastKey will return the most recently pressed Key object.
2014-05-27 04:26:37 +01:00
photonstorm
68f1bbd9a5 RetroFont charsPerRow paramters is now optional. If not given it will take the image width and divide it by the characterWidth value. 2014-05-27 04:26:23 +01:00
photonstorm
f007a77f3d Fixed Gamepad issue that incorrectly checked non-webkit prefix gamepads. 2014-05-26 22:02:53 +01:00
photonstorm
cd963242cd jshint fix + draw sprite fix 2014-05-26 20:15:11 +01:00
photonstorm
86c228d380 Group.destroy now removes any set filters (thanks @Jmaharman fix #844) 2014-05-26 20:13:00 +01:00
Richard Davey
157103e4e5 Merge pull request #847 from clark-stevenson/patch-2
Update phaser.d.ts
2014-05-26 20:09:26 +01:00
clark-stevenson
4a377767f9 Update phaser.d.ts
Handful of changes from Last week of Dev and fixed optional loader script callbacks/context.
2014-05-25 12:15:43 +01:00
photonstorm
c5d9f12858 BitmapData.alphaMask has 2 new optional parameters: sourceRect and maskRect to give more fine-grained control over where the source and mask are drawn and their size
BitmapData.draw now has two optional parameters: width and height, to let you stretch the image being drawn if needed.
2014-05-24 03:58:00 +01:00
photonstorm
7846da7c90 BitmapData.alphaMask 'mask' parameter is now optional, if not given it will use itself as the mask.
BitmapData.alphaMask now calls BitmapData.update after running.
2014-05-24 03:17:58 +01:00
photonstorm
6e9c9c10b8 BitmapData.alphaMask can now also take a Phaser.Sprite, Phaser.Image or BitmapData object as a source type.
BitmapData.alphaMask has 4 new optional parameters: x, y, x2 and y2 to control exactly where the source and mask images are drawn.
2014-05-24 03:15:13 +01:00
photonstorm
be66a694a8 jsdoc and jshint fixes. 2014-05-24 02:53:48 +01:00
photonstorm
f3ef3aed19 BitmapData.draw can now take a BitmapData object as a source type. 2014-05-24 02:43:59 +01:00
photonstorm
934f6a816c BitmapData.resize now properly updates the baseTexture and texture dimensions. 2014-05-24 02:02:49 +01:00
photonstorm
7b696dddfe BitmapData.extract has 4 new parameters: r2, g2, b2, a2 which let you re-color the extract pixels as they are drawn to the new BitmapData.
BitmapData.load will take a game object or string and resize the BitmapData to match it and then draw the pixels in.
2014-05-24 01:29:47 +01:00
photonstorm
bcddfc83c0 Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841) 2014-05-21 21:48:29 +01:00
Ville Touronen
2e7c8de118 Fixed connecting to an externalNode in Sound.play() and Sound.resume(). 2014-05-21 00:09:46 +03:00
photonstorm
2a73652ed8 Preparing for 2.0.6 "Jornhill" development. 2014-05-20 10:56:45 +01:00
photonstorm
560a44f06e README fixes for 2.0.5 release. 2014-05-20 10:37:51 +01:00
photonstorm
43e079a53a Readme update. 2014-05-20 10:31:55 +01:00
photonstorm
dbeda43aa5 Docs rebuilt for 2.0.5 2014-05-20 10:12:48 +01:00
photonstorm
8f07796af3 2.0.5 readme updates. 2014-05-20 10:03:02 +01:00
photonstorm
b8a2b9347f 2.0.5 dist files. 2014-05-20 10:03:01 +01:00
photonstorm
88306b6e12 P2 World array reset fix. 2014-05-20 10:03:00 +01:00
Richard Davey
00819626fc Merge pull request #835 from draklaw/tilemap-removeTile-fix
Tilemap removeTile sets tiles to null
2014-05-20 00:09:28 +01:00
photonstorm
a8256f4ef7 defs typo fix 2014-05-20 00:08:39 +01:00
Richard Davey
cb541beba9 Merge pull request #836 from clark-stevenson/patch-1
Update phaser.d.ts
2014-05-20 00:07:45 +01:00
clark-stevenson
4e2e6f9128 Update phaser.d.ts 2014-05-19 22:33:36 +01:00