Commit graph

180 commits

Author SHA1 Message Date
photonstorm
c9c85330ab 2.4.4 Release. 2015-10-15 12:06:38 +01:00
Clark Stevenson
13d4dfd9e3 TypeScript Definitions. PluginManager.add is now generic. Whatever class you pass in will come back out as an instance. Example var myAStar = this.game.plugins.add(Phaser.Plugin.AStar); 2015-10-06 15:34:26 +01:00
Clark Stevenson
41ff44229a Misc Formatting 2015-10-06 15:30:54 +01:00
Clark Stevenson
1c113bc414 Minor TS updates. Added missing DeviceButton. 2015-09-13 21:43:38 +01:00
Richard Davey
38eca4d5b9 Filter.addToWorld allows you to quickly create a Phaser.Image object at the given position and size, with the Filter ready applied to it. This can eliminate lots of duplicate code. 2015-09-03 00:46:47 +01:00
Richard Davey
d6ae99544b Merge pull request #2042 from cloakedninjas/dev
Fixing typos in transformCallbackContext
2015-08-31 13:15:05 +03:00
Richard Davey
f46e6e3778 Merge pull request #2043 from Garbanas/feature/typescript-definitions
Updated typescript definitions for Phaser 2.4.3
2015-08-31 13:14:32 +03:00
Christoph Dörfel
2623ddeaf7 Convenience function to remove a collision group from a P2 Body 2015-08-30 00:19:37 +02:00
Christoph Dörfel
c30b993cb9 Add some changes from phaser.comments.d.ts back to phaser.d.ts 2015-08-29 23:08:07 +02:00
Christoph Dörfel
ab6feb3ebc Fix CachedImage interface definition 2015-08-29 22:52:53 +02:00
Christoph Dörfel
2796a9db48 Updated typescript definitions for Phaser 2.4.3 2015-08-28 15:09:41 +02:00
photonstorm
32b0c98f7a Group.resetChild is a new method that allows you to call both child.reset and/or child.loadTexture on the given child object. This is used internally by getFirstDead and similar, but is made public so you can use it as a group iteration callback. Note that the child must have public reset and loadTexture methods to be valid for the call.
Group.getFirstDead, Group.getFirstAlive and Group.getFirstExists all have new optional arguments: `createIfNull`, `x`, `y`, `key` and `frame`. If the method you call cannot find a matching child (i.e. getFirstDead cannot find any dead children) then the optional `createIfNull` allows you to instantly create a new child in the group using the position and texture arguments to do so. This allows you to always get a child back from the Group and remove the need to do null checks and Group inserts from your game code. The same arguments can also be used in a different way: if `createIfNull` is false AND you provide the extra arguments AND a child is found then it will be passed to the new `Group.resetChild` method. This allows you to retrieve a child from the Group and have it reset and instantly ready for use in your game without any extra code.
2015-08-28 12:23:48 +01:00
cloakedninjas
efd6a5e152 Fixing typos in transformCallbackContext 2015-08-28 10:10:29 +01:00
Vladislav Forsh
fb299b8838 Fixed few typos in typings 2015-08-27 13:56:49 +03:00
Vladislav Forsh
3b71baff7d Fixed typos in typings for CachedImage 2015-08-27 13:53:22 +03:00
timotei
5ec7d7e4c9 Fix TypeScript addKeys declaration
Since we expect an object that's `any`
instead of an array `any[]`
2015-08-27 11:21:57 +03:00
Richard Davey
0689395aa9 Merge pull request #2033 from clark-stevenson/dev
Minor TypeScript definition edits.
2015-08-26 23:30:38 +03:00
Clark Stevenson
77329e7889 Minor TypeScript definition edits. 2015-08-26 19:07:56 +01:00
Milkey Mouse
91997662b4 Fixed TypeScript definition for replaceRGB
BitmapData.replaceRGB's 'region' argument should be optional.
2015-08-25 17:37:58 -07:00
photonstorm
486c15f16f New docs. 2015-08-24 15:43:45 +01:00
photonstorm
bf862964d2 Phaser 2.4.3 Release. 2015-08-24 13:55:00 +01:00
photonstorm
22f7aacfcb Added frameBased to the TweenManager and made Tween.frameBased reference that setting, allowing you to set it once (#2015) 2015-08-20 12:59:06 +01:00
Richard Davey
4c55dddba6 Merge pull request #1998 from cloakedninjas/dev
Adding missing event handlers in Typescript definitions
2015-08-18 15:17:49 +03:00
Vladislav Forsh
6b6c58230b Fixed typescript definitions. cache.getRenderTexture() actually returns not just texture but Object with texture and frame. 2015-08-11 20:29:10 +03:00
cloakedninjas
6d9240b176 Adding missing event handlers in Typescript definitions 2015-08-11 15:56:56 +01:00
Richard Davey
7fbeb1c062 BitmapData.line draws a line to the BitmapData in the color and thickness specified.
Lots of BitmapData updates to use local vars and 'op' property, cutting down code size.
2015-08-07 02:48:00 +01:00
Richard Davey
7588e123c7 Line.centerOn will position the Line so that its midpoint lays on the coordinates given. 2015-08-07 01:40:37 +01:00
Richard Davey
614b84e2ea * Line.rotateAround allows you to rotate a Line around the given coordinates (in world space)
* Point.rotate uses a faster and simpler rotation function when no distance argument is specified.
* Line.rotate used a calculation method which resulted in the line growing (or shrinking) in length over time, the more it was rotated. The new method never changes the lines length.
2015-08-07 01:35:31 +01:00
photonstorm
8e7b717a50 Line.midPoint will return a Point object where the x and y values correspond to the center (or midpoint) of the Line segment. 2015-08-06 17:10:39 +01:00
Richard Davey
62c87052cb Merge pull request #1985 from yahiko00/master
Extra documentation and TypeScript definition file update
2015-08-06 14:20:26 +01:00
yahiko
aaeb45e8fe - Update Phaser.Cache.addImage() signature
- Update Phaser.Cache.getImage() signature
- Add Phaser.CachedImage interface
2015-08-06 13:08:53 +02:00
Clark Stevenson
d63d9c4792 Added a couple of missing types 2015-08-01 12:08:21 +01:00
Clark Stevenson
d7deb2ac0e Updated TypeScript Readme 2015-08-01 12:06:25 +01:00
Richard Davey
cbc68ab4c9 Merge pull request #1950 from jdnichollsc/dev
Added Text.addFontStyle and Text.addFontWeight
2015-07-31 16:00:47 +01:00
photonstorm
d23e5d6eba BitmapText.smoothed is a new boolean property that allows you to set texture smoothing on a bitmap font or not. By default smoothing is always on, but you can turn it off which helps for bitmap fonts created from pixel art style character sets. 2015-07-31 15:58:00 +01:00
photonstorm
fc83dc6bdf Tween.frameBased allows you to control if a Tween updates based on the physics step (i.e. frame based) or the system clock (time based). A frame based tween will use the physics elapsed timer when updating. This means it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should be given in frames. If the Tween uses a time based update (which is the default) then the duration is given in milliseconds. In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween has actually been through. 2015-07-30 15:27:51 +01:00
photonstorm
c032d57183 Loader.images is a new method that allows you to pass an array of image keys, and optionally the urls, to the Loader and have them all added to the load queue in one go. 2015-07-30 15:01:52 +01:00
vrecluse
f68f25afb2 Fix mismatched typescript member function signature of Phaser.Point.rotate. 2015-07-30 10:59:42 +08:00
photonstorm
4b22f48c75 2.4.2 release. 2015-07-29 15:01:04 +01:00
Juan David Nicholls Cardona
655013da1b Added Text.addFontStyle and Text.addFontWeight allows you to set styles and weights font within the Text. 2015-07-28 02:05:08 -05:00
Richard Davey
50480d815f * Cache.getFrame has a new cache parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameCount has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.hasFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByIndex has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByName has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)

re: #1935
2015-07-26 13:14:25 +01:00
Richard Davey
19c9ee747a Merge pull request #1927 from shivinsky/dev
Add missing renderTabLine return type.
2015-07-24 17:52:07 +01:00
photonstorm
9401755ab9 Phaser 2.4.1 docs. 2015-07-24 13:30:46 +01:00
Alexander
dfe11ff7ea Add missing renderTabLine return type. 2015-07-23 00:57:14 +03:00
photonstorm
858ad51610 Phaser 2.4 release. 2015-07-22 15:31:30 +01:00
photonstorm
ffaa7d711f Removed BaseTextureCache requirement from BitmapData.
Fixed jshint.
Updated TS defs.
2015-07-22 13:23:40 +01:00
Clark Stevenson
10366210cf Mostly Additions based on Components. 2015-07-20 21:38:50 +01:00
Clark Stevenson
8221883c99 Update Definition File 2015-07-17 01:08:45 +01:00
photonstorm
7271eb5e2d Removed un-needed cache arguments and fixed jshint error. 2015-07-16 14:58:51 +01:00
Richard Davey
bab50d7c88 * The Cache has been internally refactored considerably. Image data is now all stored in the same object, rather than being split across the PIXI global caches (such as PIXI.TextureCache and PIXI.BaseTextureCache), which are no longer used by Phaser.
* Internally the Cache now uses a single _cache object, which is partitioned to store the various different object types. Before the cache used lots of private objects, one per data type, but it's now a lot cleaner and we've managed to cut out hundreds of lines of duplicate code in the process.
* Cache.getImage has a new argument which lets you return either just the HTML Image element or the entire image cache object, which includes the baseTexture and frame data.
* Cache.getImage will return a __default image if the key isn't given, or a __missing image if the key is given but not found in the cache. This means it will always return a valid image and no longer cause Phaser to throw runtime errors deeper down with invalid image objects.
2015-07-16 00:46:28 +01:00