Commit graph

212 commits

Author SHA1 Message Date
Clark Stevenson
0ec4fefbc4 Updated Phaser.d.ts to dev
Fixes #1008
2014-07-13 23:46:24 +01:00
Alvin
9e9cf1ab23 Added game.add.plugin to the definitions file 2014-07-13 23:45:58 +01:00
photonstorm
494c33a9f4 Rectangle.randomX will return a random value located within the horizontal bounds of the Rectangle.
Rectangle.randomY will return a random value located within the vertical bounds of the Rectangle.
2014-07-09 11:34:18 +01:00
photonstorm
003403c832 Color.getWebRGB will now accept either an Object or numeric color value. 2014-07-09 11:15:24 +01:00
photonstorm
8e7623e8a9 Updates TS defs (fix #982) 2014-07-08 13:01:43 +01:00
Clark Stevenson
a644443f6e Update TS Defs 2014-07-07 20:02:44 +01:00
photonstorm
14109aeeb1 Animation.next will advance to the next frame in the animation, even if it's not currently playing. You can optionally define the number of frames to advance, but the default is 1. This is also aliased from the AnimationManager, so you can do Sprite.animations.next().
Animation.previous will rewind to the previous frame in the animation, even if it's not currently playing. You can optionally define the number of frames to rewind, but the default is 1. This is also aliased from the AnimationManager, so you can do `Sprite.animations.previous()`.
2014-07-03 16:23:36 +01:00
photonstorm
e4536f9999 addMarker added to ts defs (#968) 2014-07-03 14:04:14 +01:00
photonstorm
212436529c Updated TS defs. 2014-07-03 02:22:56 +01:00
photonstorm
2916f0413f Group.bringToTop (and consequently Sprite.bringToTop) no longer removes the child from the InputManager if enabled (thanks @BinaryMoon, fix #928)
Group.sendToBack (and consequently Sprite.sendToBack) no longer removes the child from the InputManager if enabled.
Group.add has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.addAt has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.remove has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onRemovedFromGroup` event.
Group.removeBetween has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Group.removeAll has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Internal child movements in Group (such as bringToTop) now uses the new `silent` parameter to avoid the child emitting incorrect Group addition and deletion events.
2014-07-02 14:04:14 +01:00
clark-stevenson
3c90cccdd5 Various updates to Phaser, and 1.5.4 PIXI 2014-07-01 22:42:36 +01:00
Phaiax
3a70e76e23 Update phaser.d.ts: P2 default Collision groups 2014-06-28 02:02:29 +02:00
Phaiax
e940f81b85 Update phaser.d.ts: fix my fix: createCollisionGroup 2014-06-28 01:48:01 +02:00
Phaiax
961d25cadc createCollisionGroup -> public, included in .d.ts file 2014-06-28 01:25:51 +02:00
Richard Davey
a0a7c02da3 Merge pull request #948 from Phaiax/update-d-ts
phaser.d.ts: Changed return type of getPhysicsData to Object[]
2014-06-27 18:34:47 +01:00
Phaiax
b9791cea93 Changed return type of getPhysicsData to Object[] 2014-06-26 21:57:32 +02:00
clark-stevenson
08854613bc Update phaser.d.ts
Added setFram to Animation #944
2014-06-25 17:07:23 +01:00
clark-stevenson
e6e49088d7 GamePad + small fixes.
You are making my life easy with the def updates :D
2014-06-11 15:23:54 +01:00
photonstorm
50e47d89ee ArcadePhysics.Body.setSize if you set offset x/y values previously and then passed zero values they would be ignored (thanks @casensiom fix #889) 2014-06-11 00:21:04 +01:00
photonstorm
e923e230e0 TilemapLayers can now be used with an unbounded camera (a camera that can move beyond the world boundaries). Currently, when an unbounded camera moves outside of the world, tilemaps start acting weird because they only render themselves strictly within the world limits. With this change, the tilemap will continue scrolling and show empty space beyond its edge (thanks @jotson #851)
TilemapLayer.wrap property - if true the map is rendered as if it is on the surface of a toroid (donut) instead of a plane. This allows for games that seamlessly scroll from one edge to the opposite edge of the world without noticing the transition. Note that the World size must match the Map size (thanks @jotson #851)
2014-06-11 00:15:02 +01:00
photonstorm
b979243a8d Removed the cacheKey parameters from the AnimationParser methods as they're no longer used. 2014-06-10 23:50:12 +01:00
photonstorm
7c7d9153e6 Sprite.crop (and Image.crop) has been completely overhauled. You can now crop animated sprites (sprite sheet and texture atlas), you can define the x/y crop offset and the crop rectangle is exposed in the Sprite.cropRect property.
Sprite.updateCrop is available if you wish to update an externally referenced crop rectangle.
Sprites and Images now have their own textures objects, they are no longer references to those stored in the global Pixi.TextureCache. This allows you to redefine the texture frame dynamically without messing up any other Sprites in your game, such as via cropping. They still share global Base Textures, so image references are kept to a minimum.
Sprite.resetFrame will revert the Sprites texture frame back to its defaults dimensions. This is called when you call Sprite.crop with no rectangle, to reset the crop effect, but can be userful in other situations so we've left it as a public method.
2014-06-10 23:37:33 +01:00
photonstorm
6cf0f7073e Fixed point.normalise | normalize #872 2014-06-05 02:34:49 +01:00
photonstorm
1c9e23f535 Emitter.start has a new parameter: forceQuantity which will force the quantity of a flow of particles to be the given value (request #853)
Emitter.explode is a new short-cut for exploding a fixed quantity of particles at once.
Emitter.flow is a new short-cut for creating a flow of particles based on the given frequency.
2014-06-02 01:15:58 +01:00
photonstorm
12252944fa Time.add allows you to add an existing Phaser.Timer to the timer pool (request #864) 2014-06-02 00:54:42 +01:00
clark-stevenson
04d9e2e815 Update phaser.d.ts
Fixes #858
2014-05-29 17:50:10 +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
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
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
bcddfc83c0 Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841) 2014-05-21 21:48:29 +01:00
photonstorm
a8256f4ef7 defs typo fix 2014-05-20 00:08:39 +01:00
clark-stevenson
4e2e6f9128 Update phaser.d.ts 2014-05-19 22:33:36 +01:00
photonstorm
7b876d5fc4 ScaleManager.bounds is a Rectangle object that holds the exact size of the game canvas, taking DOM offset and game scale into account.
Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves.
Stage.bounds is now updated if the game canvas offset changes position. Note that it gives the un-scaled game dimensions.
2014-05-19 18:49:59 +01:00
Will Huxtable
6291f6de2c getText returns a string, not an Object. 2014-05-19 18:01:37 +01:00
photonstorm
1a7305b0ad New movement data added for a Pointer Locked mouse (Pointer.movementX/Y) (thanks @woutercommandeur, #831) 2014-05-19 11:51:25 +01:00
photonstorm
da75a22e82 Cache.checkKey added - allows you to pass in a Cache type and a key and return a boolean.
Cache.checkCanvasKey(key) - Check if a Canvas key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextureKey(key) - Check if a Texture key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkSoundKey(key) - Check if a Sound key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextKey(key) - Check if a Text key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkPhysicsKey(key) - Check if a Physics key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTilemapKey(key) - Check if a Tilemap key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBinaryKey(key) - Check if a Binary key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapDataKey(key) - Check if a BitmapData key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapFontKey(key) - Check if a BitmapFont key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkJSONKey(key) - Check if a JSON key exists in the cache (thanks to @delta11 for the proposal)
2014-05-19 11:34:14 +01:00
clark-stevenson
566b870785 Update phaser.d.ts
Updates from past week
2014-05-14 15:54:40 +01:00
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