photonstorm
45d92d4217
ScaleMin and ScaleMax stopped working in Phaser 2.3.0 due to an incorrect transform callback scope (thanks @brianbunch #2132 )
2015-10-13 13:32:55 +01:00
photonstorm
bd53b61ffd
Sprite.getBounds would report an inaccurate value if the sprite was negatively scaled (causing things like generateTexture to be cut off) (thanks @DavidAPC #2108 )
2015-10-13 13:02:49 +01:00
photonstorm
84373dc478
Removed use of the tilePosition
property in the Phaser.Rope class as it isn't implemented and caused calls to Rope.reset
to crash (thanks @spayton #2135 )
2015-10-13 12:20:02 +01:00
photonstorm
8e4dc1f078
ScaleManager.getParentBounds now checks if parentNode
has an offsetParent
before calling getBoundingClientRect
on it (thanks @McFarts #2134 )
2015-10-13 12:04:57 +01:00
photonstorm
b91de47d8d
Readme and JSDocs updates.
2015-10-13 12:01:08 +01:00
photonstorm
84624bd8f5
Readme update.
2015-10-07 12:00:53 +01:00
photonstorm
bf0bd9657e
Updated readme and build scripts.
2015-09-30 11:20:14 +01:00
Richard Davey
0064d969ce
Also excluded PIXI.PolyK from the build if Graphics not included (as only WebGL Graphics used it)
2015-09-29 16:27:10 +01:00
Richard Davey
084c453fcc
Added the PIXI.WebGLGraphics and PIXI.CanvasGraphics files to the Graphics custom build option. They weren't used anyway and this removes an extra 35.5KB from the build size.
2015-09-29 16:15:07 +01:00
Richard Davey
200a2a37bf
New stubs added to Grunt tasks.
2015-09-29 16:06:59 +01:00
Richard Davey
8899eddd9a
BitmapData.clear now automatically calls BitmapData.update at the end of it.
2015-09-29 14:02:26 +01:00
Richard Davey
cbf9b3f71f
WebGLRenderer.mapBlendModes optimised to cut down on file size.
2015-09-26 00:58:02 +01:00
Richard Davey
d0930bc161
Keyboard.addCallbacks didn't check to see if the arguments were null
, only if they were undefined
making the jsdocs misleading.
2015-09-23 23:18:36 +01:00
photonstorm
832034af94
Typo fix.
2015-09-23 14:04:04 +01:00
photonstorm
de5283b989
The default Button.onOverMouseOnly value has changed from false
to true
. If you used this in your touch enabled games then please be aware of this change ( #2083 )
2015-09-22 15:24:52 +01:00
photonstorm
0dee1157fc
PIXI.WebGLRenderer.updateTexture now returns a boolean depending on if the texture was successfully bound to the gl context or not.
...
PIXI.WebGLSpriteBatch.renderBatch would still try and render a texture even if `updateTexture` failed to bind it. It now checks the return value from `updateTexture` and ignores failed binds.
2015-09-22 15:20:23 +01:00
photonstorm
2633f8ce6d
InputHandler.validForInput now checks if the game object has input.enabled
set to false
and doesn't validate it for input if that's the case.
2015-09-22 15:20:23 +01:00
photonstorm
f64fc42f3e
The SoundManager now detects if the browser is running under iOS9 and uses a touchend callback to unlock the audio subsystem. Previous versions of iOS (and Android) still use touchstart. This fixes Apple's screw-up with regard to changing the way Web Audio should be triggered in Mobile Safari. Thanks Apple (thanks @MyCatCarlos for the heads-up #2095 )
2015-09-22 11:46:58 +01:00
Richard Davey
d86d01bd25
Camera.setBoundsToWorld only adjusts the bounds if it exists (thanks @prudolfs #2099 )
2015-09-20 21:07:28 +01:00
Richard Davey
96de58cc5f
Added lots more info to the jsdocs and tidied up the code for #2056
2015-09-19 11:50:26 +01:00
photonstorm
4c5dfc4847
Optimised getSmoothingEnabled, setSmoothingEnabled and setImageRenderingCrisp.
2015-09-15 14:18:00 +01:00
photonstorm
b9fcb7f179
Optimised size of PIXI.CanvasRenderer.mapBlendModes and started removal of options object.
2015-09-15 13:54:17 +01:00
photonstorm
a8e972b25a
Under setTimeOut (or when forceSetTimeOut
was true) the Time was incorrectly setting Time.timeExpected
causing game updates to lag (thanks @satan6 #2087 )
2015-09-14 16:31:16 +01:00
photonstorm
8915a570d9
Readme update.
2015-09-14 11:21:48 +01:00
photonstorm
e9cefbfccf
Added base64 polyfill for new Tiled export support.
2015-09-14 11:21:48 +01:00
Richard Davey
83eaf3a574
Added Node.js v4 stable to Travis config (thanks @phillipalexander #2070 )
2015-09-09 22:12:27 +01:00
Richard Davey
6c9e43ad36
DeviceButton was setting a duration
property on itself, which went against the read only getter of duration (thanks @winstonwolff)
2015-09-09 21:58:50 +01:00
photonstorm
90a500ec1e
Game.update could call updateLogic
multiple times in a single frame when catching up with slow device frame rates. This would cause Tweens to advance at twice the speed they should have done (thanks @mkristo)
...
Time.desiredFpsMult is a pre-calculated multiplier used in Game.update.
Time.refresh updates the `Time.time` and `Time.elapsedMS` values and is called automatically by Game.update.
2015-09-09 12:09:18 +01:00
Richard Davey
ee0094f172
Docs update.
2015-09-08 23:00:15 +01:00
photonstorm
7487c15f0e
Doc updates.
2015-09-08 15:56:28 +01:00
Richard Davey
d7a42370a4
BitmapData.move, moveH and moveV have a new optional wrap
argument allowing you to control if the contents of the BitmapData are wrapped around the edges (true) or simply scrolled off (false).
2015-09-07 01:16:43 +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
41906c5ac1
When the Text width was being calculated it would add the strokeThickness
value twice, causing an alignment offset (thanks @nickryall #2039 )
2015-08-31 11:33:18 +01:00
Richard Davey
af194d447c
jsdoc fix #2049
2015-08-31 10:57:54 +01: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
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
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
a1bd35fc35
Tidied up formatting and improved jsdocs.
2015-08-26 19:13:46 +01: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
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
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
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
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
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
photonstorm
55a7699381
Setting a P2.Body from Static or Kinematic to Dynamic will now automatically adjust the Body.mass to be 1 (thanks @wayfu #2005 )
2015-08-20 11:19:30 +01:00
Richard Davey
994a7dae73
jsdoc fix #2013
2015-08-19 22:19:55 +01:00
photonstorm
103c37cd42
BitmapData.drawFull draws the given Game Object or Group to a BitmapData and then recursively iterates through all of its children, including children of Game Objects and Groups. It can draw Text, BitmapText, Sprites, Images, Emitters and Graphics objects. It's perfectly valid to pass in game.world
as the parent object, and it will iterate through the entire display list.
2015-08-19 14:19:26 +01:00
photonstorm
176289f514
Video.stop now removes the 'playing' event listener, which stop Videos set to loop from throwing errors after being destroyed.
2015-08-18 16:04:10 +01:00
photonstorm
b1a05a6f52
BitmapText.font failed to pull the new font from the Phaser Cache, stopping it from updating properly (thanks @AbrahamAlcaina #2001 )
2015-08-18 13:48:08 +01:00
photonstorm
ac77bb8e46
Fixed download links.
2015-08-18 12:40:24 +01:00
Richard Davey
19584b78a3
Readme update.
2015-08-07 02:56:44 +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
Richard Davey
13e97532b8
Docs update.
2015-08-06 23:36:50 +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
photonstorm
9a0b6c24a4
Text can now accept undefined
or null
as the text
argument in the constructor and will cast it as an empty string.
2015-08-06 10:28:49 +01:00
Richard Davey
7fc23c9abe
Text.setTextBounds didn't add the x and y values to the width and height offsets.
2015-08-04 23:06:07 +01:00
photonstorm
1fed360659
VideoStream.active = false is used if the browser supports it, otherwise it falls back to VideoStream.stop.
2015-08-04 15:48:43 +01:00
photonstorm
f4a1f11429
PIXI.CanvasPool is a new static global created to deal with the issue of resource leaks and continuous DOM node build-up when creating lots of Text or BitmapData objects, or when calling generateTexture
on any display object. The CanvasPool will do its best to re-use out dated canvas elements rather than filling up the DOM with new ones.
...
Sprite.setTexture has a new `destroyBase` parameter - set this to `true` if you know the base used a generated texture that isn't being used by any other sprites. This will free-up the canvas for further re-use by other calls to generateTexture or Text objects.
2015-08-03 16:09:16 +01:00
photonstorm
0493e19b8b
Group.cacheAsBitmap would be incorrectly offset in Canvas mode (thanks @mkristo #1925 )
2015-08-03 12:03:20 +01:00
photonstorm
4e857f19f6
BitmapText with tints applied wouldn't update properly in Canvas mode (thanks @Pajamaman #1969 )
2015-08-03 11:51:04 +01:00
photonstorm
1102299173
readme update
2015-08-03 11:44:25 +01:00
photonstorm
98ae410c34
Removed use of the deprecated enterFullScreen
and leaveFullScreen
signals from the Scale Manager (thanks @mmanlod #1972 )
2015-08-03 11:44:00 +01:00
Richard Davey
9362a2b1f4
Text with tints applied wouldn't update properly in Canvas mode.
2015-07-31 19:09:49 +01:00
photonstorm
78fdb224ce
ArrayUtils.numberArrayStep would return an empty array if a single parameter was given, instead of a single step array (thanks @pooya72 #1958 )
2015-07-31 16:21:10 +01:00
photonstorm
f52155bce8
Readme update.
2015-07-31 16:02:25 +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
159f49d5bf
Experimenting with generateTexture fixes for Canvas.
2015-07-30 17:17:31 +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
photonstorm
1393c8a98b
InputHandler.pointerOver would get stuck in an 'isOver' state if the Sprite changed its visibility during an onUp callback (thanks @Cristy94 #1955 )
2015-07-30 14:45:34 +01:00
photonstorm
a4321e56e3
* Pointer.isDown was reset before the Input.onUp event, meaning you couldn't get the Pointer.duration from within the event.
...
* Pointer.isDown was reset before the Input tap calculations, meaning onTap wouldn't dispatch (thanks @stovenator #1953 )
2015-07-30 14:08:26 +01:00
photonstorm
6139071ebc
Preparing for 2.4.3 dev.
2015-07-29 15:14:40 +01:00
photonstorm
4b22f48c75
2.4.2 release.
2015-07-29 15:01:04 +01:00
photonstorm
962066102c
Pointer fixes for Linux FireFox ( #1932 #1944 )
2015-07-28 14:18:36 +01:00
photonstorm
a8934c392d
Phaser.Sound will now automatically check the Cache to see if the audio file it is using is still there or not. If not then it will automatically called Sound.destroy
on itself. If you do not desire this result then you should ensure that you undertake all house-keeping yourself, and properly destroy Sound objects _before_ calling Cache.removeSound
( #1946 )
2015-07-27 14:02:04 +01:00
photonstorm
fd6c29e451
Pointer.move would accidentally reset the isDown
status of the Pointer on touch devices, which broke things like Sprite input events when built to native apps or run locally ( #1932 #1943 )
2015-07-27 13:34:06 +01:00
Richard Davey
1f73bbbe94
Device.canPlayVideo now checks for ogv
as a valid file extension for OGG video files (thanks @JB-Tellez #1928 )
2015-07-26 13:19:05 +01: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
2e12cd70ed
DeviceButton would try to set altKey
, shiftKey
and ctrlKey
even for Joypads (thanks @zatch #1939 )
2015-07-26 13:01:24 +01:00
photonstorm
cef2948ec1
2.4.2 Readme update.
2015-07-24 17:53:17 +01:00
photonstorm
74a8ba0080
Preparing for 2.4.2 dev.
2015-07-24 14:04:30 +01:00
photonstorm
205fe5844d
2.4.1 readme.
2015-07-24 13:25:28 +01:00
photonstorm
444e2cffe5
More tests with the UMD wrapper.
2015-07-24 13:21:33 +01:00
Richard Davey
aeda044143
Safari on OSX wouldn't recognise button presses on trackpads (thanks JakeCake)
2015-07-23 20:54:59 +01:00
photonstorm
1113b8f683
README updated for 2.4.1 changes.
2015-07-23 16:01:16 +01:00
photonstorm
7967d32d52
Creature update.
2015-07-23 13:25:08 +01:00
photonstorm
4c97129916
Updating
2015-07-23 13:25:08 +01:00
Richard Davey
1e6f83dbd3
Preparing for 2.4.1 development.
2015-07-22 17:26:12 +01:00
photonstorm
858ad51610
Phaser 2.4 release.
2015-07-22 15:31:30 +01:00
photonstorm
8eb34f96ce
WebGL context loss and restoration is now handled directly by Phaser.
...
Cache.clearGLTextures empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.
2015-07-22 12:59:32 +01:00