Commit graph

166 commits

Author SHA1 Message Date
Richard Davey
75d6bbb251 Updated defs and improved jsdocs for #2277 2016-02-02 23:37:08 +00:00
Richard Davey
741cf1e0ed Huge TypeScript defs update (thanks to @clark-stevenson - this is all of the changes from #2156 merged into the current build) 2016-02-02 23:30:03 +00:00
Stafford Williams
b904efeb4f allow state to be passed to constructor 2016-02-02 13:47:21 +11:00
Stafford Williams
02c0f27d64 fixed getter 2016-02-02 13:26:47 +11:00
Stafford Williams
4a0aaa8914 added RandomDataGenerator.state() typescript definitions 2016-02-02 13:21:45 +11:00
Richard Davey
cd68f9f9cd Defs udpate #2211 2016-02-01 16:54:25 +00:00
Richard Davey
5170ad0d46 Merge pull request #2211 from juanmirod/dev
Fix in typescript definition file: Pointer definition
2016-02-01 18:52:52 +02:00
Richard Davey
c1169b35d4 Merge pull request #2252 from milkey-mouse/fix-blendmode-tsdefs
Fix issue #2188: BitmapData.copy() blendMode type from number to string in TS defs
2016-02-01 18:47:01 +02:00
Richard Davey
a74edd1ee9 Docs and defs. 2016-02-01 16:38:06 +00:00
Richard Davey
37d9b3402d Merge pull request #2226 from milkey-mouse/fix-retrofont-smoothed
Change RetroFont.smoothed from string to boolean
2016-02-01 18:32:22 +02:00
Richard Davey
3350c537c7 Defs update and README update. 2016-02-01 16:30:41 +00:00
Richard Davey
1f664af97c Merge pull request #2255 from PixelWaffles/fix-ts-d-export
Fix issue with typescript module import/require.
2016-02-01 18:28:59 +02:00
zimpy
13ffb7d1ce Typescript definitions - fixed return types on some functions of Arcade.Body 2016-01-15 19:30:29 +01:00
pixelwaffles
08be1e9b2e Fix issue where importing the phaser module in typescript (ie "import * as phaser from 'phaser';" or "require('phaser');") fails, resulting in a "Cannot find module 'phaser'." typescript error. 2015-12-15 22:31:21 +08:00
Milkey Mouse
df48e37658 Fix issue #2188: blendMode type from number to string
This fixes a minor TS definitions bug (issue #2188) where the blendMode
of BitmapData.copy, .copyRect, .draw, and .drawGroup all had the number
type instead of string.
2015-12-10 20:40:50 -08:00
Milkey Mouse
c59243b336 TS defs: RetroFont.smoothed from string to boolean 2015-11-22 21:38:09 -08:00
Juan Miguel Rodriguez Ceron
cbdd9bdfab Update phaser.d.ts 2015-11-18 01:16:54 +01:00
Juan Miguel Rodriguez Ceron
e3ff1a3774 Fix Pointer leftbutton and rightButton definitions
Pointer properties rightButton and LeftButton are DeviceButton objects instead of booleans (http://phaser.io/docs/2.4.4/Phaser.Pointer.html#rightButton)
2015-11-18 01:15:09 +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
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
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
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