photonstorm
f2636a155a
Readme update.
2015-05-22 15:10:27 +01:00
photonstorm
312c31b778
jsdoc and formatting fixes.
2015-05-21 11:53:18 +01:00
Josh Tepei
6bf44a859c
Fixed a grammar error in README.md
...
Added a comma for further clarity on line 54 of README.md
2015-05-20 14:23:33 -07:00
photonstorm
5a91f85b1f
Typo.
2015-05-19 16:57:36 +01:00
photonstorm
ab594e930b
Readme update.
2015-05-19 16:09:19 +01:00
photonstorm
c3d123641b
Readme update.
2015-05-19 14:53:38 +01:00
photonstorm
0f6dd1a1a6
Device.firefoxVersion is a new property that contains the major Firefox version number if running within Firefox, otherwise zero.
2015-05-18 14:51:25 +01:00
photonstorm
bd44a25212
Readme updates.
2015-05-18 12:55:48 +01:00
photonstorm
5a149ea4ec
Docs updates.
2015-05-14 16:52:09 +01:00
photonstorm
f7514dc979
Docs updates.
2015-05-12 13:03:27 +01:00
photonstorm
7b938f396e
Rectangle.bottomLeft has been added (thanks @mattmogford #1788 )
2015-05-12 13:03:26 +01:00
photonstorm
4a4d7d594c
Docs updates.
2015-05-08 04:15:03 +01:00
photonstorm
25178fdf85
Docs update.
2015-05-08 01:51:18 +01:00
photonstorm
af66b49f31
If a BitmapData is created with a width or height set to zero then the width and/or height are set to a default value (256) instead to avoid getContext errors.
2015-05-06 16:50:10 +01:00
photonstorm
f623e68eb7
Docs updates.
2015-05-06 01:12:09 +01:00
photonstorm
9aa022ba8e
Docs update.
2015-05-05 17:03:44 +01:00
photonstorm
9ce76fcef8
Docs update.
2015-05-05 16:25:57 +01:00
photonstorm
33ece1fc52
Readme updates.
2015-05-05 14:02:10 +01:00
photonstorm
159a3f2f40
Readme updates.
2015-05-03 13:53:03 +01:00
photonstorm
df3c684760
PIXI.BaseTexture.forceLoaded allows you to set a BaseTexture as loaded, with the given width and height. It then calls BaseTexture.dirty
. This is important for when you don't want to modify the shape of the source object by forcing in complete
or dimension properties it may not naturally have, but still wish to use it as a base texture.
2015-05-03 13:53:02 +01:00
photonstorm
3f51463c7b
PIXI.CanvasTinter.tintWithMultiply was performing a double drawImage operation for no reason. Simplified down to a single drawImage call.
2015-05-03 13:53:02 +01:00
photonstorm
e291f6d590
Added type
parameter to VideoTexture.fromUrl
allowing you to define the mime-type of the video file, which is required for Firefox and Safari in most cases.
2015-04-29 14:41:47 +01:00
photonstorm
da0bd86c26
Rectangle.ceil runs Math.ceil() on both the x and y values of the Rectangle.
...
Rectangle.ceilAll runs Math.ceil() on the x, y, width and height values of the Rectangle.
2015-04-29 13:13:11 +01:00
photonstorm
8290e8c371
Text.setShadow has two new optional parameters: shadowStroke
and shadowFill
. These allow you to set if the drop shadow is applied to the Text stroke, the Text fill or both of them (thanks @qdrj #1766 )
...
Text.shadowStroke and Text.shadowFill allow you to toggle if the drop shadow is applied to the Text stroke or fill independently.
2015-04-27 16:22:36 +01:00
photonstorm
8519c9e394
The Tween.onStart signal wasn't dispatched if the Tween had a delay set. It's now dispatched immediately if no delay, or after the delay if set. It also respects the autoStart
parameter and will still dispatch even if autoStart
is true.
2015-04-27 16:22:35 +01:00
photonstorm
30450cb9bc
Loader.atlas and Cache.addTextureAtlas
will now automatically determine the format of the JSON data (array or hash) when added to the Cache. You no longer need to specify it explicitly if JSON, only if XML.
2015-04-23 02:35:09 +01:00
photonstorm
05d0a94116
Phaser.AnimationParser methods JSONData
, JSONDataHash
and XMLData
have all had their cacheKey
parameter removed as it's no longer used.
2015-04-21 16:01:11 +01:00
photonstorm
ede76cf4f6
Frame.uuid has been removed (was flagged as deprecated for several releases). This has a two-fold effect: First it means that the property no longer exists and secondly it means that the AnimationParser (the class responsible for loading sprite sheets and texture atlases) no longer has to call either RandomDataGenerator.uuid OR populates the PIXI.TextureCache. The first saves some CPU time and the second saves memory by not creating references to textures it doesn't ever use. The PIXI.TextureCache is now ignored by Phaser other than for the __missing
and __default
textures.
2015-04-21 15:55:04 +01:00
photonstorm
94b4d5d73c
Doc updates.
2015-04-21 05:10:27 +01:00
photonstorm
6c96568dd1
Files can now be added to the Loader with an absolute URL even if you have a Loader.baseURL set. In previous versions the baseURL would still be prepended to the file URL, but the Loader now checks if the a file URL begins with http
or //
and skips prepending the baseURL to it.
...
All calls to Loader methods that add files to the queue, such as `Loader.image` or `Loader.atlas`, now have the URL as an optional parameter. If not set Loader will assume the URL to be based on the key given. For example the following: `game.load.image("boom", "boom.png")` can now be expressed as just `game.load.image("boom")`, or `game.load.atlas("player", "player.png", "player.json")` can now be shortened to `game.load.atlas("player")`. Please see the freshly updated jsdocs for full details.
2015-04-21 02:14:41 +01:00
photonstorm
714580f9a9
Manual fix #1752
2015-04-17 17:35:52 +01:00
photonstorm
59beae762d
The SoundManager didn't accurately detect devices or browser environments with no sound card present and would try to carry on using a null Web Audio context (thanks @englercj #1746 )
...
SoundManager.pauseAll, resumeAll and stopAll now checks if the SoundManager.noAudio is set and ignores the calls.
SoundManager.usingWebAudio is set to `false` by default (used to be `true`) and is only explicitly set if Web Audio is available and hasn't been disabled in the PhaserGlobal object.
SoundManager.touchLocked is now set to `false` should the device be using legacy Audio, avoiding the unlock call running without need.
2015-04-17 03:49:20 +01:00
photonstorm
2e2ba665cd
PIXI.DisplayObject.updateTransform has a new optional parameter parent
. If the DisplayObject doesn't have a parent (i.e. it isn't on the display list yet) then in the past updateTransform
would fail. This meant you couldn't do things like scale or rotate a Sprite and then draw it to a RenderTexture or BitmapData, as calls to updateTransform would be ignored. The new checks now look to see if the parent
parameter is set. If so this takes priority over the actual parent and is used to modify the transform (note that it **doesn't** reparent the DisplayObject, it merely uses it for the transform.) If there is no parent (explicitly or via the parameter) then it falls back to use Phaser.World as the parent. If it can't reach that then no transform takes place.
2015-04-17 03:22:23 +01:00
photonstorm
eca360301c
Bumping up the release to 2.4.0 due to the API changes in the State Manager.
2015-04-15 01:37:41 +01:00
photonstorm
9f493044d4
The StateManager would incorrectly call loadUpdate
while the game was paused or if the State didn't have an update
method defined even after the loader was completed.
...
The StateManager would incorrectly call `loadRender` while the game was paused or if the State didn't have an `render` method defined even after the loader was completed.
2015-04-14 15:34:32 +01:00
photonstorm
8f06991527
Added support for the [Creature Automated Animation Tool]( http://www.kestrelmoon.com/creature/ ). You can now create a Phaser.Creature object which uses json data and a texture atlas for the animations. Creature is a powerful animation tool, similar to Spriter or Spine. It is currently limited to WebGL games only, but the new libs should prove a solid starting point for anyone wanting to incorporate Creature animations into their games.
2015-04-13 23:16:29 +01:00
photonstorm
0ffa499bd0
Removed getJSON parse parameter. It's already parsed :)
2015-04-13 22:06:57 +01:00
photonstorm
e5f1f6f896
Cache.getPixiTexture will return a PIXI.Texture from the cache based on the given key. A PIXI Texture is created automatically for all images loaded and added to the cache.
...
Cache.getPixiBaseTexture will return a PIXI.BaseTexture from the cache based on the given key. A PIXI BaseTexture is created automatically for all images loaded and added to the cache.
Cache.getTexture has now been removed (it was deprecated several versions ago). Use Cache.getRenderTexture instead.
Cache.getJSON has a new optional parameter: `parse`. If `true` the method will pass the data through JSON.parse before returning it. The default is `false` to retain backwards compatibility.
2015-04-13 20:25:42 +01:00
photonstorm
615925123a
Group would automatically add a child into the _hash array as soon as the child was created (or moved into the Group). This no longer happens. Instead the child is only added to Group.hash if it is enabled for Arcade Physics. However Group.addToHash and the hash array have been exposed in case you were taking advantage of the _hash even though it was a private array.
...
Enabling Arcade Physics would add the deltaCap property onto Phaser.Time, even though the property doesn't exist any more, changing the class shape in the process.
2015-04-13 16:34:39 +01:00
photonstorm
bd57510528
Group would automatically add a child into the _hash array as soon as the child was created (or moved into the Group). This no longer happens. Instead the child is only added to Group.hash if it is enabled for Arcade Physics. However Group.addToHash and the hash array have been exposed in case you were taking advantage of the _hash even though it was a private array.
2015-04-13 16:32:03 +01:00
photonstorm
432516fa0f
Physics.Arcade.sort has a new property 'sortDirection'. If not specified it will use World.sortDirection. If the Group given as the first parameter has its physicsSortDirection
property set that will override any other setting.
...
Physics.Arcade.sort now calls one of four functions: sortLeftRight, sortRightLeft, sortTopBottom and sortBottomTop. Each of which takes 2 Sprites as arguments.
Physics.Arcade.sort now doesn't bail out if the Group contains a mixture of physics and non-physics enabled objects, as the Group hash is now only ever populated with physics enabled objects. Also the sort comparison functions no longer return -1 if the bodies are invalid, but zero instead (#1721 )
2015-04-13 16:29:34 +01:00
photonstorm
eb506e2698
PIXI.Graphics in Canvas mode wouldn't respect the objects visible or alpha zero properties, rendering it regardless (thanks @TimvdEijnden #1720 )
2015-04-13 14:19:44 +01:00
photonstorm
bb8b0d04fc
Graphics.drawPolygon can now accept a Phaser.Polygon or PIXI.Polygon object, as well as a points array ( #1712 )
2015-04-13 13:00:52 +01:00
photonstorm
f155ad452c
Tilemap.createFromObjects has been updated for Tiled 0.11 and can now look-up object layers based on id, uid or name. It will also now copy over Sprite scaling properties if set (thanks @mandarinx #1738 )
2015-04-13 12:40:12 +01:00
photonstorm
7b8a430aac
TilemapLayer docs incorrectly reported it as extending Phaser.Image, but it doesn't share the same components so has been updated.
...
TilemapLayer was missing the Input component (thanks @uhe1231 #1700 )
2015-04-13 12:23:30 +01:00
photonstorm
04cb3889a9
P2.getConstraints would return an array of null objects. It now returns the raw p2 constraint objects (thanks @valueerrorx #1726 )
2015-04-13 12:12:18 +01:00
photonstorm
b41cf3bc8c
AnimationManager.frameName setter wasn't checking if _frameData
existed before accessing it (thanks @nesukun #1727 )
2015-04-13 11:58:45 +01:00
photonstorm
36c064511c
Added guards around context.getImageData
calls in BitmapData, Text and Canvas Tinting classes to avoid crashing restricted browsers like Epic Browser. Please understand that several Phaser features won't work correctly with this browser (thanks @Erik3000 #1714 )
2015-04-02 14:47:44 +01:00
photonstorm
645723f939
Sprite was missing the Health and InCamera components.
2015-03-30 13:51:47 +01:00
photonstorm
5fb1130175
The LoadTexture component has had a redundant dirty
call removed from it.
...
TileSprites were missing a `physicsType` property, causing them to not collide with anything (thanks @numbofathma #1702 )
2015-03-28 00:56:02 +00:00
photonstorm
49be59b0c9
Added missing resumed
method to Phaser.State class template.
2015-03-26 10:54:32 +00:00
photonstorm
8233b0a079
Phaser 2.3.0.
2015-03-26 02:37:31 +00:00
photonstorm
d4e838592c
Readme tweaks.
2015-03-26 02:22:05 +00:00
photonstorm
bd62459a56
Readme release changes.
2015-03-26 02:10:57 +00:00
photonstorm
93dc67be71
Graphics.drawArc would fail to draw any subsequent arcs if you set beginFill
on it after drawing the first arc.
...
Graphics.drawArc would only move to the center position of the first arc created and ignore any subsequent arcs.
Graphics.drawArc now correctly renders multiple arcs across both WebGL and Canvas. You no longer need to specifically call moveTo to move into the correct place to draw the arc.
Graphics.drawArc now bails out if the startAngle = the endAngle and/or the sweep is invalid *before* adjusting any points.
Graphics.drawArc now correctly handles the fill on the CanvasRenderer if the arc is a subsequent arc and no line style is set.
2015-03-25 13:00:08 +00:00
photonstorm
f4d55b7785
When an Emitter is destroyed via Emitter.destroy it now removes itself from the Phaser Particle Manager, freeing it up for garbage collection and stopping it from being processed.
2015-03-25 05:07:39 +00:00
photonstorm
aa13ec0165
Animation.play wouldn't correctly set the play state on the Game Objects AnimationManager causing the animation to fail to start (calling AnimationManager.play did work however), now they're both consistently working.
2015-03-25 03:59:36 +00:00
photonstorm
244372384e
When an Animation completes playback and isn't set to loop it would change the currentFrame
property to be the first frame in the set after the onComplete
callback had fired. This meant if you set a Sprite to a new frame within an Animation onComplete callback then your change would have been overwritten by the animation itself. This is now no longer the case.
2015-03-24 23:17:13 +00:00
photonstorm
d80ec1ae6d
Phaser 2.3 Release Candidate 2.
2015-03-24 21:35:23 +00:00
photonstorm
06b484e71c
Huge docs update.
2015-03-24 16:01:07 +00:00
photonstorm
96e313e768
If you paused a Sound object that is using audio markers and then resumed it, it wouldn't correctly calculate the resume duration - causing the sound to sometimes play into the marker that followed it (thanks @AnderbergE #1669 )
2015-03-24 14:43:35 +00:00
photonstorm
7e19f45350
When the Game first boots it will now call window.focus()
. This allows keyboard events to work properly in IE when the game is running inside an iframe. You can stop this from happening by setting window.PhaserGlobal.stopFocus = true
(thanks @webholics #1681 )
2015-03-24 13:27:27 +00:00
photonstorm
7aa4d0ad0d
When a State is started and linked to Phaser it has a new property created on it: key
, which is the string identifier used by the State.
2015-03-24 10:21:03 +00:00
photonstorm
3db4313e5d
Docs update.
2015-03-23 16:13:04 +00:00
photonstorm
7010883bc3
Tidying up.
2015-03-23 15:07:09 +00:00
photonstorm
4fbb7d2a7e
readme updates.
2015-03-23 08:13:59 +00:00
photonstorm
cb9ef4f12e
Text.padding specifies a padding value which is added to the line width and height when calculating the Text size. ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions ( #1561 #1518 )
2015-03-19 01:54:14 +00:00
photonstorm
b13acdb23b
TilingSprite.destroy fixed if TilingSprite hasn't ever been rendered ( #1663 )
2015-03-19 01:39:39 +00:00
photonstorm
5a9b509b44
ArraySet.removeAll allows you to remove all members of an ArraySet and optionally call destroy
on them as well.
...
GameObject.input.dragStartPoint now stores the coordinates the object was at when the drag started. This value is populated when the drag starts. It can be used to return an object to its pre-drag position, for example if it was dropped in an invalid place in-game.
2015-03-19 00:51:13 +00:00
photonstorm
62b2fb51d6
Link changed ( fix #1672 )
2015-03-18 19:25:12 +00:00
photonstorm
f2b03c8826
Readme updated.
2015-03-18 19:14:58 +00:00
photonstorm
2483cd5df4
Various readonly Body properties flagged as 'readonly' in the jsdocs ( #1643 )
2015-02-26 23:32:14 +00:00
photonstorm
f99f182a6f
Arcade Physics is now using a spacial pre-sort for all Sprite vs. Group and Group vs. Group collisions. You can define the direction the sort will prioritise via the new sortDirection
property. By default it is set to Phaser.Physics.Arcade.LEFT_RIGHT
. For example if you are making a horizontally scrolling game, where the player starts on the left and moves to the right, then this sort order will allow the physics system to quickly eliminate any object to the right of the players bounds. This cuts down on the sheer volume of actual collision checks needing to be made. In a densely populated level it can improve fps rate dramatically.
...
There are 3 other directions available (`RIGHT_LEFT`, `TOP_BOTTOM` and `BOTTOM_TOP`) and which one you need will depend on your game type. If you were making a vertically scrolling shoot-em-up then you'd pick `BOTTOM_TOP` so it sorts all objects above and can bail out quickly.
More importantly you can switch the `sortDirection` at run-time with no loss of performance. Just make sure you do it *before* running any collision checks. So if you had a large 8-way scrolling world you could set the `sortDirection` to match the direction the player was moving in and adjust it in real-time, getting the benefits as you go. My thanks to Aaron Lahman for inspiring this update.
2015-02-26 21:24:07 +00:00
photonstorm
74eeddf956
You can now set a resolution
property in your Game Configuration object. This will be read when the Pixi renderer instance is created and used to set the resolution within that ( #1621 )
2015-02-26 10:52:30 +00:00
photonstorm
41396d5ad2
Merged all of the relevant Pixi 2.2.7 fixes in ( #1621 )
2015-02-25 17:04:48 +00:00
photonstorm
321e11d0a5
A State swap now sets the Loader.reset hard
parameter to true
by default. This will null any Loader.preloadSprite that may have been set ( #1636 )
2015-02-25 05:18:49 +00:00
photonstorm
466a4d11bb
Loader.preloadSprite had an extra guard added to ensure it didn't try to updateCrop a non-existent sprite (thanks @noidexe #1636 )
2015-02-25 03:08:37 +00:00
photonstorm
5635bed54f
Docs update.
2015-02-23 13:58:57 +00:00
photonstorm
5fd066c610
ArraySet.getByKey gets an item from the set based on the property strictly equaling the value given.
2015-02-22 19:30:23 +00:00
photonstorm
8d71e8a32c
Animation.update skips ahead frames when the system is lagging, however it failed to set the animation to the final frame in the sequence if the animation skipped ahead too far (thanks @richpixel #1628 )
2015-02-22 19:26:56 +00:00
photonstorm
02ef1555c5
A TweenData wouldn't take into account the repeatDelay
property when repeating the tween, but now does. A TweenData also has a new property yoyoDelay
which controls the delay before the yoyo will start, allowing you to set both independently (thanks @DreadKnight #1469 )
...
Tween.updateTweenData allows you to set a property to the given value across one or all of the current tweens. All of the Tween methods like Tween.delay and Tween.repeat have been updated to use this.
Tween.repeat has a new parameter `repeatDelay` which allows you to set the delay (in ms) before a tween will repeat itself.
Tween.yoyo has a new parameter `yoyoDelay` which allows you to set the delay (in ms) before a tween will start a yoyo.
Tween.interpolation has a new parameter `context` which allows you to define the context in which the interpolation function will run.
2015-02-19 00:51:32 +00:00
photonstorm
35b4926eb8
Undoing previous change - doesn't actually work at all! #1620
2015-02-18 23:32:12 +00:00
photonstorm
9effb4a946
Stage.visibilityChange now has a second parameter fromPhaser
. This is set to true
by the Stage._onChange
callback. This should mean that when Phaser is listening for window.onblur
and window.onfocus
events it will only trigger the visibilityChange if that event was generated by Phaser itself. If it was generated by something else on the page or iframe it should now be ignored (thanks @austinhallock #1620 )
2015-02-18 23:12:08 +00:00
photonstorm
b0261e4a5f
Group.cursorIndex is the index of the item the Group cursor points to. This replaces Group._cache[8].
2015-02-18 22:54:19 +00:00
photonstorm
88ab104da4
BitmapText has a new maxWidth
property that will attempt to wrap the text if it exceeds the width specified.
2015-02-18 22:36:12 +00:00
photonstorm
ba727555c8
Emitter.flow now works in a slightly different (and more useful!) way. You can now specify a quantity
and a total
. The quantity
controls how many particles are emitted every time the flow frequency is met. The total
controls how many particles will be emitted in total. You can set total
to be -1 and it will carry on emitting at the given frequency forever (also fixes #1598 thanks @brianbunch)
2015-02-18 22:35:05 +00:00
photonstorm
9879fc6387
If you load an image and provide a key that was already in-use in the Cache, then the old image is now destroyed (via Cache.removeImage
) and the new image takes its place.
2015-02-18 16:58:08 +00:00
photonstorm
ef3cb1f31d
Sound in Web Audio now uses AudioContext.onended to trigger when it will stop playing instead of using a time based value. This is only used if the sound doesn't loop and isn't an audio sprite, but will give a much more accurate Sound.onStop
event. It also prevents short audio files from being cut off during playback ( #1471 ) and accounts for time spent decoding.
2015-02-18 11:25:17 +00:00
photonstorm
0dbcf88767
Readme update.
2015-02-17 16:41:04 +00:00
photonstorm
1b83674f6d
Docs update.
2015-02-17 06:01:51 +00:00
photonstorm
9670c8aa86
InputHandler.enableDrag with a boundsRect set now takes into account the Sprites anchor when limiting the drag (thanks @unindented #1593 )
...
InputHandler.enableDrag with a boundsSprite set now takes into account both the Sprites anchor and the boundsSprite anchor when limiting the drag.
2015-02-16 15:49:46 +00:00
photonstorm
8c23bca62d
Sprite.left, Sprite.right, Sprite.top, Sprite.bottom are new properties that contain the totals of the Sprite position and dimensions, adjusted for the anchor.
...
Sprite.offsetX and Sprite.offsetY contain the offsets from the Sprite.x/y coordinates to the top-left of the Sprite, taking anchor into consideration.
2015-02-16 15:47:55 +00:00
photonstorm
01a23b7d91
Tween.to now correctly accepts arrays are destination values, which makes the Tween interpolate through each value specified in the array using the defined Tween.interpolation method (see new example, thanks @FridayMarch26th #1619 )
...
Tween.interpolationFunction was using the incorrect context to invoke the function. This is now defined in `TweenData.interpolationFunctionContext` and defaults to `Phaser.Math`. If you provide your own interpolation function then please adjust the context accordingly (thanks @FridayMarch26th #1618 )
2015-02-16 12:23:54 +00:00
photonstorm
ae198e9364
InputHandler was using the wrong property in checkBoundsSprite
when fixedToCamera (thanks @yig #1613 )
2015-02-14 19:10:06 +00:00
photonstorm
f60b2b7635
World.setBounds if called after you had already started P2 Physics would incorrectly create a new collision group for the wall objects. P2.World now remembers the settings you provide for each wall and the collision group, and re-applies these settings should the world dimensions ever change (thanks @nextht #1455 )
2015-02-11 22:33:29 +00:00
photonstorm
b692d3b456
PIXI.TextureSilentFail is a boolean that defaults to false
. If true
then PIXI.Texture.setFrame
will no longer throw an error if the texture dimensions are incorrect. Instead Texture.valid
will be set to false
( #1556 )
2015-02-11 22:10:53 +00:00
photonstorm
daf8440247
Tile.properties is now unique to that specific Tile, and not a reference to the Tileset index bound properties object. Tile.properties can now be modified freely without impacting other tiles sharing the same id ( #1254 )
2015-02-11 21:40:37 +00:00
photonstorm
8892f46a83
PIXI.WebGLRenderer.destroy has been fixed to decrement the glContextId
and remove it from the PIXI.instances global. Game.destroy
now hooks into this. This now means that you can now delete and create your Phaser game over and over without it crashing WebGL after the 4th attempt ( #1260 )
2015-02-11 21:02:15 +00:00
photonstorm
b68c3071a6
Phaser.Ellipse.contains is now working again (thanks @spayton)
2015-02-11 18:51:35 +00:00
photonstorm
0e7820bde5
Group.forEach (and many other Group methods) now uses the children.length
value directly instead of caching it, which both helps performance and stops the loop from breaking should you remove a Group child in the invoked callback.
2015-02-11 17:19:56 +00:00
photonstorm
599bcf5f97
Loader.audiosprite has a new jsonData
parameter. It allows you to pass a pre-existing JSON object (or a string which will be parsed as JSON) to use as the audiosprite data, instead of specifying a URL to a JSON file on the server (thanks @jounii #1447 )
...
Loader.audiosprite has a new `autoDecode` parameter. If `true` the audio file will be decoded immediately upon load.
2015-02-11 16:16:58 +00:00
photonstorm
aa2df803b7
Pointer.stop would call event.preventDefault
if Pointer._stateReset
was true
, which is always true
after a State has changed and before Pointer.start has been called. However this broken interacting with DOM elements in the case where the State changes and you immediately try to use the DOM element without first having clicked on the Phaser game. An additional guard was added so preventDefault
will now only be called if both _stateReste
and Pointer.withinGame
are true (thanks @satan6 #1509 )
2015-02-11 16:03:24 +00:00
photonstorm
afd4108f04
Readme update.
2015-02-11 15:11:33 +00:00
photonstorm
6b8622a336
Timer.update was calling the TimerEvent callback even if TimerEvent.pendingDelete
was already set to true
, causing timer events to stack-up in cases where a new TimerEvent was generated in the callback (thanks @clowerweb #838 )
2015-02-11 14:43:23 +00:00
photonstorm
74bee324a5
Sound.fadeIn now supports fading from a marker, as well as the entire audio clip, so now works with audio sprites (thanks @vorrin #1413 )
2015-02-11 13:52:16 +00:00
photonstorm
dfee82834d
Sound.loop even when set for WebAudio wouldn't use the AudioContext loop property because Sound.start was being invoked with an offset and duration. Now if loop
is true and no marker is being used it will use the native Web Audio loop support ( #1431 )
...
SoundManager.setDecodedCallback lets you specify a list of Sound files, or keys, and a callback. Once all of the Sound files have finished decoding the callback will be invoked. The amount of time spent decoding depends on the codec used and file size. If all of the files given have already decoded the callback is triggered immediately.
Sound.loopFull is a new method that will start playback of the Sound and set it to loop in its entirety.
2015-02-11 05:17:53 +00:00
photonstorm
18ff04810f
ArcadePhysics.distanceToPointer now calculates the distance in world space values.
...
ArcadePhysics.moveToPointer no longer goes crazy if the maxTime parameter is given and the Sprite is positioned in a larger game world (thanks @AnderbergE #1472 )
2015-02-10 22:16:35 +00:00
photonstorm
7a066a3a8c
World.setBounds will now adjust the World.x/y values to match those given ( #1555 )
2015-02-10 21:40:53 +00:00
photonstorm
cc7096b045
jsdoc fix #1543
2015-02-10 21:22:36 +00:00
photonstorm
0054dc996b
The Loader now directly calls StateManager.loadComplete rather than the StateManager listening for the loadComplete event, because Loader.reset unbinds this event (and it's easy to accidentally remove it too)
...
Loader.onLoadComplete is dispatched *before* the Loader is reset. If you have a `create` method in your State please note that the Loader will have been reset before this method is called. This allows you to immediately re-use the Loader without having to first reset it manually.
2015-02-10 17:04:04 +00:00
photonstorm
dfc8ff32d2
You can now tint animated Sprites in Canvas mode. Or change the texture atlas frame of a tinted Sprite or Image. Please note that this is pretty expensive (depending in the browser), as the tint is re-applied every time the *frame changes*. The Pixi tint cache has also been removed to allow for subtle tint color shifts and to avoid blowing up memory. So use this feature sparingly! But at least it does now work ( #1070 )
2015-02-10 14:53:55 +00:00
photonstorm
823997744b
Docs update.
2015-02-10 14:53:55 +00:00
photonstorm
816a80f39a
If Body.customSeparateX
or customSeparateY
is true
then the Body will no longer be automatically separated from a **Tilemap** collision or exchange any velocity. The amount of pixels that the Body has intersected the tile is available in Body.overlapX
and overlapY
, so you can use these values to perform your own separation in your collision callback ( #992 )
2015-02-10 12:58:12 +00:00
photonstorm
4489a12fd8
Sprite.loadTexture and Image.loadTexture now no longer call updateTexture
if the texture given is a RenderTexture. This fixes issues with RetroFonts in IE11 WebGL as well as other RenderTexture related IE11 problems ( #1310 #1381 #1523 )
2015-02-10 12:27:55 +00:00
photonstorm
c154b8c785
Loader.resetLocked is a boolean that allows you to control what happens when the loader is reset, *which happens automatically on a State change*. If you set resetLocked
to true
it allows you to populate the loader queue in one State, then swap to another State without having the queue erased, and start the load going from there. After the load has completed you could then disable the lock again as needed.
...
Loader.reset has a new optional 2nd parameter `clearEvents` which if set to `true` (the default is false) will reset all event listeners bound to the Loader.
2015-02-10 11:58:17 +00:00
photonstorm
ec732e497f
Docs update.
2015-02-09 22:19:05 +00:00
photonstorm
3fc8fbadca
Docs update.
2015-02-09 20:10:51 +00:00
photonstorm
2b2ee27912
If for whatever reason you wish to hide the Phaser banner in the console.log you can set window.PhaserGlobal.hideBanner
to true
and it will skip the output. Honestly I'd rather if you didn't, but the option is now there.
2015-02-09 20:10:51 +00:00
photonstorm
35a04b2f1e
TilemapParser now supports Tiled 0.11 version maps which includes the rotation
property on all Object types.
...
Tilemap.createFromObjects now checks for a `rotation` property on the Object and if present will set it as the Sprite.angle (#1433 )
2015-02-08 23:25:41 +00:00
photonstorm
e85be1f1d8
BitmapText.font wouldn't update an internal Pixi property (fontName) causing the text to fail to change font (thanks @starnut #1602 )
2015-02-08 22:07:36 +00:00
photonstorm
46e5cfc639
Readme update.
2015-02-08 21:57:09 +00:00
photonstorm
9cdcdc7bc5
Device.touch checks if window.navigator.maxTouchPoints
is >= 1
rather than > 1, which now allows touch events to work properly in Chrome mobile emulation.
2015-02-05 06:12:20 +00:00
photonstorm
d710caed9e
Body.reset now resets the Body.speed value to zero.
2015-02-05 05:12:31 +00:00
photonstorm
8dec37107e
MSPointer.capture allows you to optionally event.preventDefault the pointer events (was previously always on)
...
MSPointer.event now stores the most recent pointer event.
MSPointer.pointerDownCallback, pointerMoveCallback and pointerUpCallback all allow you to set your own event based callbacks.
2015-02-05 05:12:00 +00:00
photonstorm
336fdfa672
TileSprites weren't destroying WebGL textures, leading to eventual out of memory errors (thanks @chacal #1563 )
2015-02-03 21:32:39 +00:00
photonstorm
3eba508382
Sprite.events.onDragStart has 2 new parameters x
and y
which is the position of the Sprite before the drag was started. The full list of parameters is: (sprite, pointer, x, y)
. This allows you to retain the position of the Sprite prior to dragging should dragFromCenter
have been enabled (thanks @vulvulune #1583 )
2015-02-03 21:32:39 +00:00
photonstorm
2ba6e0528e
TilemapLayer.getTiles now returns a copy of the Tiles found by the method, rather than references to the original Tile objects, so you're free to modify them without corrupting the source (thanks @Leekao #1585 )
2015-02-03 21:32:39 +00:00
photonstorm
ea4c9771a0
Updated docstrap-master toc.js to fix nav scrolling (thanks @abderrahmane-tj @vulvulune #1589 )
2015-02-03 20:28:18 +00:00
photonstorm
7003b65df6
Added missing properties to the InputHandler prototype, reducing hidden class modifications.
2015-02-03 20:28:18 +00:00
photonstorm
260490fe06
Fixed issue in PIXI.canUseNewCanvasBlendModes which would create false positives in browsers that supported multiply
in Canvas path/fill ops, but not for drawImage
(Samsung S5 for example). Now uses more accurate magenta / yellow mix test.
2015-02-03 16:16:25 +00:00
photonstorm
d37ffe6a8f
Sound.fadeTween is now used for Sound.fadeIn and Sound.fadeOut audio tweens.
...
Sound.stop and Sound.destroy now halt a fade tween if in effect.
2015-01-28 17:18:32 +00:00
photonstorm
6d967b6545
Error in diffX and diffY calculation in Tilemap.paste (thanks @amelia410 #1446 )
2015-01-20 10:49:15 +00:00
photonstorm
a67d2df6f0
BitmapData.text will render the given string to the BitmapData, with optional font, color and shadow settings.
2015-01-18 12:24:00 +00:00
photonstorm
587c3e5f6a
Arcade.Body.friction
allows you to have more fine-grained control over the amount of velocity passed between bodies on collision.
2015-01-18 12:24:00 +00:00
photonstorm
0f42b530eb
Physics.Arcade.isPaused
allows you to toggle Arcade Physics processing on and off. If true
the Body.preUpdate
method will be skipped, halting all motion for all bodies. Note that other methods such as collide
will still work, so be careful not to call them on paused bodies.
2015-01-10 00:30:02 +00:00
photonstorm
8973423e98
Sprite.frame and AnimationManager.frame wouldn't return the correct index if a sprite sheet was being used unless it had first been set via the setter.
2015-01-08 01:28:38 +00:00
photonstorm
65f8820514
SoundManager.unlock checks for audio start
support and falls back to noteOn
if not found.
2015-01-06 13:50:15 +00:00
photonstorm
413a59c516
Preparing for 2.3.0 development.
2015-01-06 07:24:28 +00:00
photonstorm
1c05e42f6b
Docs and Change Log update.
2015-01-06 06:56:59 +00:00
photonstorm
74951a41b4
Update for 2.2.2.
2015-01-06 06:20:46 +00:00
photonstorm
e015fec9a6
README updates.
2015-01-06 05:47:51 +00:00
photonstorm
6dedd89e36
Final screen shots.
2015-01-06 05:21:30 +00:00
photonstorm
2b7bb330ed
Slimmer shots.
2015-01-06 04:30:39 +00:00
photonstorm
8c5b8c7204
Shot alignment.
2015-01-06 04:26:25 +00:00
photonstorm
a57d2e5cb2
Added game screen shots.
2015-01-06 04:19:19 +00:00
photonstorm
8620f20dec
New div tests.
2015-01-06 02:26:03 +00:00
photonstorm
2b1dcb4a66
Can't ditch borders, so let's try with align=right.
2015-01-06 02:16:01 +00:00
photonstorm
2da6b9faa6
Table text alignment part 2. How 1990 :)
2015-01-06 02:13:33 +00:00
photonstorm
f390b88d86
Table text alignment. How 1990 :)
2015-01-06 02:01:15 +00:00
photonstorm
b7ddb09eec
README update test.
2015-01-06 01:55:27 +00:00
Richard Davey
8ad56c99e2
README update.
2015-01-05 23:31:36 +00:00
Richard Davey
479b3f0583
README update.
2015-01-05 21:53:50 +00:00
photonstorm
0adf0f3672
Readme update.
2015-01-05 21:26:59 +00:00
photonstorm
3e062826f9
Readme update.
2015-01-05 16:30:22 +00:00
photonstorm
741131312a
BitmapData.drawGroup draws the immediate children of a Phaser.Group to a BitmapData. Children are only drawn if they have their exists
property set to true
. The children will be drawn at their x
and y
world space coordinates. When drawing it will take into account the child's rotation, scale and alpha values. No iteration takes place. Groups nested inside other Groups will not be iterated through.
...
BitmapData.copy `tx` parameter if `null` and `source` is a Display Object, it will default to `source.x`.
BitmapData.copy `ty` parameter if `null` and `source` is a Display Object, it will default to `source.y`.
2015-01-05 14:28:16 +00:00
photonstorm
689501c15c
Phaser.Point.angleSq removed. It didn't work so any code relying on it would be broken, and it's unclear what it was meant for (thanks @nextht #1396 )
2015-01-05 13:00:07 +00:00
photonstorm
fc63d0a33a
Ellipse.right and Ellipse.bottom setters fixed (thanks @nextht #1397 )
...
Fixed double Ellipse.getBounds definition (thanks @nextht #1397 )
2015-01-05 12:36:35 +00:00
photonstorm
4bc8fb3c8f
Docs update #1489
2015-01-05 11:57:46 +00:00
photonstorm
35c68d4c9e
Tidied up Emitter.update.
2015-01-05 11:43:24 +00:00
photonstorm
9f6b7b49e5
Particles.Arcade.Emitter.makeParticles now checks the given quantity
value against Emitter.maxParticles
. If quantity
is more than maxParticles
then the maxParticles
value is used instead.
2015-01-05 11:22:07 +00:00
Richard Davey
a2c4cafa70
Update readme.
2015-01-04 12:38:52 +00:00
photonstorm
af15b9b4e7
Line.reflect will calculate the reflected, or outgoing angle of the line and a given line if they intersect. This can be used for Body vs. Line collision responses and rebounds.
...
Line.normalX and Line.normalY contain the x and y components of the left-hand normal of the line.
Line.fromAngle will sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`.
2015-01-04 05:11:19 +00:00
Richard Davey
1ceec8ec27
Added Code of Conduct.
2015-01-03 01:31:42 +00:00
Richard Davey
d3f913f415
Docs update.
2015-01-03 00:31:48 +00:00
Richard Davey
b3f322469b
Added Events.onEnterBounds to the destroy method (thanks @legendary-mich #1497 )
2015-01-02 21:53:20 +00:00
photonstorm
15d5b54c26
Removed redundant updateTransform call.
2015-01-02 04:15:27 +00:00
photonstorm
c1eb456ed2
Mouse.mouseMoveCallback is flagged as deprecated.
2015-01-02 04:14:44 +00:00
photonstorm
b22233a0bc
docs update and sound marker check.
2015-01-02 04:14:44 +00:00
Richard Davey
da27373c90
Device.webAudio check inversed to avoid throwing a warning in Chrome.
2015-01-01 21:38:02 +00:00
photonstorm
a6c6bf8e06
Time.reset would incorrectly reset the _started
property, now maps it to Time.time
(thanks @XekeDeath #1467 )
2014-12-18 08:07:38 +00:00
photonstorm
013abfe956
Added Pixi 2.2.0 details to README.
2014-12-17 13:53:05 +00:00
photonstorm
c6c5856dec
Phaser.Graphics.drawCircle now overrides PIXI.drawCircle which means the docs are now correct re: diameter not radius (thanks @ethankaminski #1454 )
2014-12-17 13:44:12 +00:00
photonstorm
f23c0aa24b
Removed redundant tolerance
parameter from Rectangle.intersects (thanks @toolness #1463 )
2014-12-17 13:25:21 +00:00
photonstorm
269af69da5
Added extra checks to Sound.play to stop it throwing DOM Exception Error 11 if the sound.readyState
wasn't set or the sound was invalid. Also wrapped stop()
call in a
try catch`.
2014-12-17 13:07:19 +00:00
photonstorm
5029427e14
Tween.stop fired a different set of onComplete parameters to Tween.update. Both now dispatch onComplete(target, tween) as the parameters in that order (thanks @P0rnflake #1450 )
2014-12-15 09:42:18 +00:00
photonstorm
3c564a33b6
The P2 World constructor wouldn't let you use your own config unless you specified both the gravity *and* broadphase. Now allows one or both (thanks @englercj #1412 )
2014-12-11 22:04:45 +00:00
photonstorm
93e0d2f3b1
Docs update.
2014-12-11 22:00:06 +00:00
photonstorm
0cd0a5bd9b
Phaser 2.2.3 Build Files for testing.
2014-12-11 09:26:14 +00:00
photonstorm
8d9e1196c0
readme update.
2014-12-09 15:27:26 +00:00
photonstorm
38a224df3e
Tween.delay, Tween.repeat and Tween.yoyo will no longer throw an error if called before a TweenData object has been created (via Tween.to or Tween.from) (thanks @SomMeri #1419 )
2014-12-07 11:31:48 +00:00
photonstorm
e7f3b9188e
Preparing for Phaser 2.2.2 development.
2014-12-04 11:49:53 +00:00
photonstorm
d206e3c2d5
Docs update.
2014-12-04 11:28:02 +00:00
photonstorm
847cde81a9
Custom Particle classes that used a BitmapData wouldn't work (thanks @hardalias #1402 )
2014-12-03 20:59:44 +00:00
photonstorm
3371f9ff1e
Added Game.debug reset method for when the debug manager is disabled (thanks @DanielSitarz #1407 )
2014-12-03 20:56:39 +00:00
photonstorm
1227232fd6
Updated readme.
2014-12-03 20:54:25 +00:00
photonstorm
e271c63ca6
Preparing for Phaser 2.2.1.
2014-12-03 13:41:48 +00:00
photonstorm
95ffa83e34
Phaser 2.2.0 Docs.
2014-12-03 10:39:20 +00:00
photonstorm
35e2893db4
Game.lockRender is a new property. If false
Phaser will automatically render the display list every update. If true
the render loop will be skipped. You can toggle this value at run-time to gain exact control over when Phaser renders. This can be useful in certain types of game or application. Please note that if you don't render the display list then none of the game object transforms will be updated, so use this value carefully.
2014-12-02 09:03:55 +00:00
photonstorm
def662f28f
Text.setShadow has had the default color
value changed from rgba(0,0,0,0)
to rgba(0,0,0,1)
so it appears as a black shadow by default - before the alpha channel made it invisible.
2014-12-02 09:03:55 +00:00
photonstorm
5b6e41b112
Readme updated.
2014-12-02 09:03:55 +00:00
photonstorm
30d2d1973a
readme update.
2014-11-27 21:33:21 +00:00
photonstorm
fb733ddcca
onPreRenderCallback wasn't being cleared on a State swap.
2014-11-26 13:12:51 +00:00
photonstorm
667d477a16
P2.BodyDebug always lagged behind the position of the Body it was tracking by one frame, which became visible at high speeds. It now syncs its position in the Body.postUpdate which prevents this from happening (thanks @valueerror)
2014-11-25 22:21:11 +00:00
photonstorm
e86f00eb55
Text.lineSpacing works correctly again. Before no space was added between the lines (thanks @intimidate #1367 and @brejep #1366 )
2014-11-25 17:06:17 +00:00
photonstorm
72eaee3139
Adjusted Sprite.preUpdate to remove the lifespan calculation.
2014-11-25 14:18:18 +00:00
photonstorm
7aaa63e7a5
When you change State the P2 Physics world is no longer fully cleared. All of the bodies, springs, fixtures, materials and constraints are removed - but config settings such as gravity, restitution, the contact solver, etc are all retained. The P2.World object is only created the very first time you call Physics.startSystem. Every subsequent call hits P2.World.reset instead ( #1292 )
2014-11-25 12:09:03 +00:00
photonstorm
54e79f5b25
Grunt and docs updates.
2014-11-25 00:24:29 +00:00
photonstorm
4ecd7f99a8
Docs update.
2014-11-24 11:12:09 +00:00
photonstorm
1928427bcb
Phaser TypeScript defs fixes.
2014-11-23 11:32:13 +00:00
photonstorm
874f60c1bc
Removed CocoonJS hack - woohoo!
2014-11-21 10:40:18 +00:00