Commit graph

4230 commits

Author SHA1 Message Date
Christoph Dörfel
ab6feb3ebc Fix CachedImage interface definition 2015-08-29 22:52:53 +02:00
Rafael Barbosa Lopes
1485fd110a Updated to use a matching expression instead.
Replaced the booleans with a matching expression. Now, URLs
beginning with the following patterns will be ignored:

- blob:
- data:
- http://
- https://
- //

As suggested by @pnstickne.
2015-08-28 17:19:24 -03:00
Rafael Barbosa Lopes
14632cdfb5 Prevent 'data:' URLs from being prefixed
Fixes an issue where 'data:' URLs may get prefixed by
`#baseURL` and `#path` properties making these URLs invalid.
2015-08-28 15:14:30 -03: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
Richard Davey
14dd1eabbf Updated readme. 2015-08-28 09:14:09 +01:00
photonstorm
f0d7da1c56 Removed RND.float as it's a reserved word :(
Fixed jshint errors.
2015-08-27 19:28:01 +01:00
photonstorm
b14510d1e7 Fixing some emitter issues with position. 2015-08-27 19:11:26 +01:00
photonstorm
9d1217ea21 Fixed the rnd calls. 2015-08-27 14:57:50 +01:00
photonstorm
ddcc46124c RandomDataGenerator.float is a new alias for the method 'realInRange' and takes the same arguments. 2015-08-27 14:57:23 +01:00
photonstorm
9798864cc6 Emitter.emitParticle now has 4 new optional arguments: x, y, key and frame. These allow you to override whatever the Emitter default values may be and emit the particle from the given coordinates and with a new texture. 2015-08-27 14:48:52 +01:00
Richard Davey
f380549240 Merge pull request #2036 from qdrj/dev
Fixed TypeScript definitions
2015-08-27 14:26:44 +03: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
Richard Davey
a2fda3fa47 Merge pull request #2034 from pnstickne/wip-2032d
Change splice.call(arguments, ..) to use slice
2015-08-27 12:47:53 +03:00
Richard Davey
902ad357c6 Merge pull request #2035 from timotei/dev
Fix TypeScript `addKeys` declaration
2015-08-27 12:43:14 +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
Paul
26a6338072 Change splice.call(arguments, ..) to use slice
- Bypasses issue of usage incorrectly omitting 2nd argument to `splice`

- More clear of intent; `slice` does not modifify `arguments`

- `slice` is faster across all desktop browsers, by varying degrees
  - Probably due to parameter-aliasing and de-opts when modified.
  - Both `slice` and `splice` create a new Array object
2015-08-26 23:50:16 -07:00
Richard Davey
bae732ca9e Merge pull request #2027 from bsparks/dev
utilize the heal method
2015-08-26 23:38:40 +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
Richard Davey
a1bd35fc35 Tidied up formatting and improved jsdocs. 2015-08-26 19:13:46 +01:00
Clark Stevenson
77329e7889 Minor TypeScript definition edits. 2015-08-26 19:07:56 +01:00
Richard Davey
b4a72b8747 Merge pull request #2025 from rwrountree/dev
Optimize the average function in math.js
2015-08-26 21:07:24 +03:00
Richard Davey
31d6c4d43c Merge pull request #2029 from milkey-mouse/dev
Fixed TypeScript definition for replaceRGB
2015-08-26 21:04:19 +03:00
Richard Davey
8b6d696316 jsdoc fix. 2015-08-26 03:59:18 +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
Ben Sparks
b7efb93698 utilize the heal method instead of just adding to health when reviving, so that maxHealth is respected 2015-08-25 14:42:02 -07:00
photonstorm
1e88bdda70 Loader.bitmapFont wouldn't automatically set the atlasURL value if just the key was given. 2015-08-25 13:46:28 +01:00
Rusty Rountree
f017db806a Phaser.Math.fuzzyCeil and Phaser.Math.fuzzyFloor should not return boolean values as stated in @return section of the comments 2015-08-25 04:06:06 -05:00
Rusty Rountree
92bac852c8 Optimize the average function in math.js 2015-08-25 02:16:31 -05:00
photonstorm
482d3c9882 Preparing for 2.4.4 dev. 2015-08-24 16:01:58 +01:00
photonstorm
db641ca82e Updated date in the readme. 2015-08-24 15:56:06 +01: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
94223c66b7 Updated blend mode multiply check (#1994) 2015-08-24 13:53:46 +01:00
photonstorm
cc7b632a37 Phaser.TilemapParser.INSERT_NULL is a new boolean that controls what happens when the parser encounters an empty tile: When scanning the Tiled map data the TilemapParser can either insert a null value (true) or a Phaser.Tile instance with an index of -1 (false, the default). Depending on your game type depends how this should be configured. If you've a large sparsely populated map and the tile data doesn't need to change then setting this value to true will help with memory consumption. However if your map is small, or you need to update the tiles (perhaps the map dynamically changes during the game) then leave the default value set (thanks #1982) 2015-08-24 12:36:23 +01:00
photonstorm
0cce3f8287 Enabling a filter on a display object that had a blend mode set would cause the object to become invisible. The two cannot be combined, so when you set a filter on a display object it now automatically resets the blend mode to NORMAL. The same does not happen in reverse however, so if you've got a filter set and then change the blend mode it will still break. Be careful to capture this yourself (thanks @wayfu #1994) 2015-08-24 12:26:02 +01:00
photonstorm
5056eedb58 Optimised local vars to reduce file size.
Trying out null tile properties.
2015-08-24 12:03:32 +01:00
photonstorm
4ab5a07abf jsdocs fix. 2015-08-24 12:03:03 +01:00
photonstorm
09f5742410 Tilemap.shuffle was calling the deprecated Phaser.Utils.shuffle, which has now moved to Phaser.ArrayUtils.shuffle. 2015-08-24 12:02:43 +01:00
photonstorm
bcedd921b7 Cache.addSpriteSheet didn't include default values for the frameMax, margin and spacing arguments (thanks @vladkens #2017 #2018) 2015-08-24 11:43:34 +01:00
photonstorm
845a14ff55 TilingSprite._renderCanvas wasn't correctly allowing for pixel rounding (thanks @ximop #2022 2015-08-24 11:38:59 +01:00
photonstorm
226b7070a8 Fixed issue with an extra 4px being added to the canvas elements because the display type wasn't set. 2015-08-24 11:32:32 +01:00
photonstorm
a5a503b02c Phaser 2.4.3-RC1 build files. 2015-08-21 16:25:41 +01:00
photonstorm
5ffb5b558d Tilemap.createFromObjects has been strengthened so that will only create Sprites for matching gids/ids/names. It also only sets the Sprite width and height values if they are present in the Tiled data (thanks @pparke #2012) 2015-08-20 13:22:06 +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
photonstorm
a9354d4a3f Added withinGame to Pointer Debug. 2015-08-20 12:48:09 +01:00
photonstorm
4fa1ffb4cf JSDocs update. 2015-08-20 12:47:59 +01:00
photonstorm
99fbf35236 * Pointer.withinGame is no longer automatically set to 'false' in the Pointer.stop method - it will check if the Pointer actually is within the stage bounds and only set withinGame to false if it's outside the bounds.
* MSPointer now has an `onPointerUpGlobal` handler for when the pointer is released outside of the canvas, but still within the browser window. This means that in IE11 a Sprites `onInputUp` event will now trigger even when outside the canvas (thanks @bvargish #2000)
* MSPointer now has handles for the pointer being over and outside of the canvas element, which sets the Pointer.withinGame booleans accordingly. It also triggers the Mouse.mouseOutCallback and Mouse.mouseOverCallback callbacks respectively.
* The MSPointer event listeners have been renamed to all lower-case, i.e. 'pointerDown' is now 'pointerdown'.
2015-08-20 12:47:50 +01:00