photonstorm
07ef075e92
Phaser.Line.intersectsRectangle checks for intersection between a Line and a Rectangle, or any Rectangle-like object such as a Sprite or Body.
2016-05-24 02:30:00 +01:00
photonstorm
9b9e398c73
InputHandler.checkPointerDown had an incorrect single pipe character |, instead of an OR check ||, and an isDown
check, causing Button Over events to fail (thanks @pengchuan #2486 )
2016-05-23 13:03:11 +01:00
photonstorm
09dd84565e
Arcade Physics Body incorrectly positioned if the Sprite had a negative scale (see http://www.html5gamedevs.com/topic/22695-247-248-body-anchoring-any-migration-tips/ ) (thanks @SBCGames @icameron @Nuuf @EvolViper #2488 #2490 )
2016-05-23 12:46:01 +01:00
photonstorm
7844ad927c
Preparing for 2.4.9 dev.
2016-05-23 12:32:37 +01:00
photonstorm
d1234d1685
Preparing for 2.5.0 dev.
2016-05-19 13:45:51 +01:00
photonstorm
9f28d0659d
Phaser 2.4.8 release.
2016-05-19 12:36:51 +01:00
photonstorm
a6a2c61240
Sprites that had a tint on them, that then had their frame changed via either Sprite.frame
or Sprite.frameName
wouldn't re-tint the new frame, and would become stuck on the old frame in Canvas mode (thaks @spayton #2453 )
2016-05-17 21:04:40 +01:00
photonstorm
d161a7f6bc
Sounds played using the Audio tag, set to loop, would get caught in an endless pause-play loop cycle (thanks @rroylance #2473 )
2016-05-17 16:43:11 +01:00
photonstorm
54683b7fb2
Sounds played using the Audio tag, that were paused and then resumed again (either directly in code, or via a game pause event) would not resume from the point at which they paused (thanks @rroylance #2473 )
2016-05-16 15:16:19 +01:00
photonstorm
02e8b1ae0a
If you set Game.renderType to Phaser.HEADLESS
it will no longer render the output to the canvas. The canvas is still created (although not added to the DOM), as it's required internally, but no rendering now takes place on it (thanks @ForgeableSum #2464 )
2016-05-16 14:53:11 +01:00
photonstorm
ac89d1aec7
Arcade Physics Body has a new property worldBounce
. This controls the elasticity of the Body specifically when colliding with the World bounds. By default this property is null
, in which case Body.bounce is used instead. Set this property to a Phaser.Point object in order to enable a World bounds specific bounce value (thanks @VitaZheltyakov #2465 )
2016-05-16 13:53:12 +01:00
photonstorm
f9994fac75
Fixed a bug in Arcade Physics Body.preUpdate which would incorrectly apply the position of an offset Body (one which has had Body.setSize used on it) when combined with a Sprite with a non-zero anchor (thanks @SBCGames #2470 )
2016-05-16 13:39:46 +01:00
photonstorm
19dce62734
Arcade Physics has had a new world
argument added to the following functions: distanceBetween
, distanceToXY
, distanceToPointer
, angleBetween
, angleToXY
and angleToPointer
. The argument (which is false by default), when enabled will calculate the angles or distances based on the Game Objects world
property, instead of its x
and y
properties. This allows it to work for objects that are placed in offset Groups, or are children of other display objects (thanks @Skeptron for the thread #2463 )
2016-05-16 13:31:57 +01:00
photonstorm
a26bd55811
TS defs fix #2475
2016-05-16 13:03:48 +01:00
photonstorm
4fd2524c61
Text.setStyle has a new argument update
which will optionally automatically call updateText
after setting the new style (thanks @staff0rd #2478 )
2016-05-16 12:55:27 +01:00
photonstorm
f34b567295
BitmapData.copy, and by extension any method that uses it, including BitmapData.draw, drawGroup and drawFull, now all support drawing RenderTexture objects. These can either be passed directly, or be the textures of Sprites, such as from a call to generateTexture.
2016-05-12 03:48:14 +01:00
photonstorm
94832677b9
Docs update.
2016-05-11 16:39:39 +01:00
photonstorm
9649f714bb
InputHandler.checkPointerDown and checkPointerOver will now test the worldTransform scale property of a Sprite. If zero it will fast return, where-as before it would incorrectly report an up event (thanks @jaapaurelio #2466 )
2016-05-11 12:25:35 +01:00
photonstorm
a2ba13e33f
Docs update.
2016-05-11 11:27:36 +01:00
photonstorm
16203a378a
PIXI.defaultRenderer is now set to null
in Game.destroy, allowing it to be reset if a new Game instance is created on the same page (thanks @xtforgame ##2474)
2016-05-11 11:27:36 +01:00
Morton Fox
e125696ccd
Update link to CONTRIBUTING.md
2016-05-07 00:43:13 -04:00
photonstorm
b008fc7216
Readme update.
2016-04-28 00:18:08 +01:00
photonstorm
16378713b4
JSDocs update ( #249 )
2016-04-27 12:57:41 +01:00
photonstorm
f494c867c7
Fixed an issue in the Arcade Physics overlap method where it would only detect overlaps up to the max bias threshold and no further (thanks @rgk #2441 )
...
The Arcade Physics overlap method would return false if two bodies were overlapping but neither had any velocity (i.e. they were embedded into each other)
2016-04-25 11:38:51 +01:00
photonstorm
620b95e510
Updated docs and TS defs re: #2443
2016-04-23 04:36:47 +01:00
photonstorm
6bc93de7a5
Preparing for 2.4.8 dev.
2016-04-23 04:32:47 +01:00
photonstorm
a29cc64932
Phaser 2.4.7 Final.
2016-04-22 15:15:28 +01:00
photonstorm
b441ee315f
Docs update.
2016-04-22 11:56:06 +01:00
photonstorm
7d9c817373
Dragging a Sprite while the camera was moving would slowly cause the Sprite position to become out of sync the further the camera moved. A Sprite being dragged now tracks the camera position during the drag update and adjusts accordingly (thanks @jeroenverfallie #1044 )
2016-04-19 01:54:24 +01:00
photonstorm
628dd1c420
P2.Body.offset is now used and applied to the Sprite position during rendering. The values given are normal pixel values, and offset the P2 Body from the center of the Sprite (thanks @Mourtz #2430 )
2016-04-18 20:57:41 +01:00
photonstorm
a2d145a43d
When the Loader loads audio via the Audio tag, instead of Web Audio, it used to use Phaser.GAMES[_this.game.id].load
as the callback handler, which would stop it from working if you had multiple Loaders set-up within Phaser. It now uses a local reference to _this
instead (thanks @SBCGames #2435 )
2016-04-18 16:44:28 +01:00
photonstorm
257a22b170
When loading Video with the asBlob
argument set it now uses a 'blob' type for the XHR loader, and doesn't cast the resulting file as a Blob upon load. This fixes loading videos as blobs on Chrome for Android (thanks @JuCarr #2433 )
2016-04-18 16:17:27 +01:00
photonstorm
41add1b4bf
Phaser 2.4.7 RC1.
2016-04-14 13:23:44 +01:00
photonstorm
aad499b025
Tidying up the code base for 2.4.7.
2016-04-14 12:43:10 +01:00
photonstorm
5221bfd5da
You can now pass in your own Canvas element to Phaser and it will use that instead of creating one itself. To do so you must pass a Game Configuration object to Phaser when you instantiate it, and set the canvas
property of the config object to be the DOM element you wish to use, i.e.: { canvas: document.getElementById('yourCanvas') }
(thanks @Friksel #2311 )
2016-04-14 11:57:10 +01:00
photonstorm
48ff74b718
Text update.
2016-04-14 11:48:08 +01:00
photonstorm
150e443875
Docs update to include browserify info #2424
2016-04-13 16:05:03 +01:00
photonstorm
1f8e352b7c
Docs update.
2016-04-13 15:44:21 +01:00
photonstorm
a6528aa9fc
Docs fix.
2016-04-13 15:44:21 +01:00
photonstorm
d04a6ec402
Docs update.
2016-04-12 02:21:02 +01:00
photonstorm
f4277efc20
Alternative snooker-ball like collision test.
2016-04-11 16:43:17 +01:00
photonstorm
7102a34706
Camera.flash is a new function that makes the camera 'flash' over the top of your game. It works by filling the game with the solid fill color specified, and then fading it away to alpha 0 over the duration given. This is great for things like hit effects. You can listen for the Camera.onflashComplete Signal.
...
Camera.fade is a new function that makes the camera fade to the color given, over the course of the duration specified. This is great for things like transitioning from one State to another. You can listen for the Camera.onFadeComplete Signal.
Camera.resetFX resets any active FX, such as a fade or flash and immediately clears it. Useful to calling after a fade in order to remove the fade from the Stage.
Phaser.Camera.ENABLE_FX is a const that controls if the Camera FX are available or not. It's `true` by default, but if you set it to `false` before boot then it won't create the Graphics object required to process the effects.
2016-04-09 04:05:07 +01:00
photonstorm
2ea94c83e6
Camera.shake is a new function that creates a camera shake effect. You can specify the intensity, duration and direction of the effect. You can also set if it should shake the camera out of bounds or not.
2016-04-09 02:57:16 +01:00
photonstorm
dba84d5931
Camera has a new property: lerp
. This is a Point object, that allows you to control the amount of horizontal and vertical smoothing to be applied to the camera when it tracks a Sprite. It works both with and without deadzones, and is turned off by default. Set it to low values such as 0.1 for really smooth motion tracking (thanks to @WombatTurkey for the idea of adding this)
2016-04-09 01:07:19 +01:00
photonstorm
cc5361dd6d
World.separate has been optimized to cut down on the number of calls to intersect
from 3 calls per Game Object collision check, to 2. So if you were colliding 50 sprites it will reduce the call count from 150 to 100 per frame. It also reduces the calls made to seperateX
and seperateY
by the same factor.
...
Two immovable bodies would never set their overlap data, even if an overlap only check was being made. As this is useful data to have this has been changed. Two immovable bodies will still never separate from each other, but they _will_ have their `overlapX` and `overlapY` properties calculated now.
2016-04-07 18:04:45 +01:00
photonstorm
50e126f59e
* Body has two new properties: left
and top
. These are the same as Body.x
and Body.y
but allow you to pass the Body to geometry level functions such as Circle.contains.
...
* Body.setCircle allows you to define a Body as using a circle to collide with instead of a rectangle. You can set the radius of the collision circle and an offset.
* Body.render now renders both circle and rectangle body shapes to the Debug canvas.
* World.intersects has been updated to support both circle and rectangle body shapes, and supports quick-paths for circle vs. circle and rect vs. rect checks.
* World.circleBodyIntersects is a new method that checks for intersection between a Body that has been defined as a circle, and a normal rectangle based Body. This is used internally by World.intersects, but exposed for direct calls as well.
2016-04-07 17:01:16 +01:00
photonstorm
b9f62e77e6
You can now pass a TilemapLayer as a Texture to a TileSprite. A limitation of this is that if you pass it to a TileSprite it will make a fill pattern from the TilemapLayer at that instant it's passed, and it won't keep track of the layer in future should it update (thanks @jdnichollsc #1989 )
2016-04-07 03:45:21 +01:00
photonstorm
e5ceb7e9bc
P2.World.setBounds has been re-written completely. If the World is resized it no longer removes the P2 body instances and re-creates them. Instead it checks to see which walls are required and then just moves the position of the shapes instead, or updates them, or creates or destroys them as required. This is far more efficnent, especially in a game which see's a lot of world bounds changes (i.e. resizes responsively in browser)
2016-04-07 01:56:42 +01:00
photonstorm
5c261821fe
P2.World.updateBoundsCollisionGroup didn't set the _boundsOwnGroup
private var, meaning the World.setBounds
method wasn't able to restore previously set collision masks automatically (thanks @jmp909 #2183 )
2016-04-07 01:25:52 +01:00
photonstorm
4d5a037ae5
P2.World.updateBoundsCollisionGroup wouldn't use the boundsCollisionGroup
mask if you passed true
as the argument, only if it was left undefined.
2016-04-07 01:18:19 +01:00