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
b162ca4d51
Improved Math.clamp and docs.
2016-04-07 16:14:44 +01:00
photonstorm
952b5c04ea
The start of Arcade Physics circle bodies.
2016-04-07 14:32:53 +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
e4a505d4b6
Lots of new Signals documentation.
2016-04-07 02:44:29 +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
photonstorm
58af40ca92
Added a bit more info to the SoundManager docs re: #2373
2016-04-07 01:07:19 +01:00
photonstorm
787111c12c
A Game Object with fixedToCamera = true
that was then set for Input, and enabled for dragging from its center (input.enableDrag(true)
) would throw an error upon being dragged (thanks @solusipse #2367 )
2016-04-07 00:44:53 +01:00
photonstorm
fc7b5c79e3
Graphics objects can now have a Physics Body directly attached to them, where-as before it would throw an error due to a lack of anchor property (thanks @NLilley #2400 )
2016-04-07 00:14:41 +01:00
photonstorm
0945083a4b
Removed further mentions of RenderTexture re: TileSprite.
2016-04-06 23:58:34 +01:00
photonstorm
b3757ed862
jsdocs update #2384
2016-04-06 02:33:29 +01:00
photonstorm
896b32a28c
SoundManager.muteOnPause is a new boolean that allows you to control if the Sound system gets muted automatically when a Phaser game pauses, such as when it loses focus. You may need to set this to false
if you wish to control the audio system from outside of your Phaser game, i.e. from DOM buttons or similar ( #2382 )
2016-04-06 02:09:22 +01:00
photonstorm
61bc4a8dca
Sound.play when using an AudioTag would ignore the muted state of the SoundManager and play regardless. It now checks the SoundManager.mute state on play, and sets the volume accorindingly (thanks @brianbunch #2139 )
2016-04-06 01:41:54 +01:00
photonstorm
03ea59940c
Docs update.
2016-04-06 01:29:16 +01:00
Richard Davey
8e74f4d06e
Merge pull request #2187 from BdR76/patch-1
...
Bugfix, reuse emitter when parameter explode=false
2016-04-06 01:28:49 +01:00
Richard Davey
2f0231b3cd
Merge pull request #2415 from jakewilson/dev
...
Fixed and added warnings.
2016-04-06 01:21:09 +01:00
photonstorm
988290631f
When setting a global volume for the SoundManager it would previously incorrectly calculate the volumes of AudioTag based Sound objects that were not played at volume 1. The new approach uses Sound.updateGlobalVolume which adjusts the Sound volume to be a percentage of the global volume. So if the global volume is 0.5 and the Sound volume is 0.5, the Sound will play with an actual volume of 0.25 (thanks @VitaZheltyakov #2325 )
2016-04-06 01:19:32 +01:00
Richard Davey
71056ccb69
Merge pull request #2371 from stoneman1/dev
...
Fixed video for future
2016-04-06 01:08:22 +01:00
photonstorm
4d69b13977
Passing a BitmapData to a TileSprite as a texture would fail if the BitmapData had not been previously added to the cache. It now uses the new frameData property (thanks @mzamateo @lucap86 #2380 )
2016-04-06 00:44:55 +01:00
photonstorm
c33b53fa95
BitmapData has a new property frameData
which is a Phaser.FrameData container instance. It contains a single Frame by default, matching the dimensions of the entire BitmapData, but can be populated with additional frames should you wish to create animations from dynamic BitmapData textures.
2016-04-06 00:43:21 +01:00
photonstorm
18c0b150b5
FrameData.destroy will nullify the local arrays used to contain Frame instances.
2016-04-06 00:43:09 +01:00
photonstorm
0c2ac47981
Camera.position would return the view rectangles centerX/Y coordinates, instead of view.x/y (which is what Camera.x/y returns), so it has been updated to return view.x/y instead (thanks @kamparR #2120 )
2016-04-06 00:18:01 +01:00
photonstorm
ecbff44354
Group.getByName searches the Group for the first instance of a child with the name
property matching the given argument. Should more than one child have the same name only the first instance is returned.
2016-04-05 23:59:05 +01:00
photonstorm
65f8f111c8
Game.forceSingleUpdate is now true
by default.
2016-04-05 23:40:15 +01:00
photonstorm
b762e1dc55
Added jsdocs warning re: #2045
2016-04-05 23:28:02 +01:00
photonstorm
4c3a30a6f6
PluginManager.destroy is now called by Game.destroy.
2016-04-05 23:16:52 +01:00
photonstorm
6933b41e6f
Arcade.Body's speed property was only set when the body moved, it now updates regardless (thanks @mark-henry #2417 )
2016-04-05 23:06:57 +01:00
photonstorm
aee0212e11
Camera.follow now uses the Targets world
property to seed the camera coordinates from, rather than its local position. This means Sprites that are members of offset Groups, or transformed display lists, should now be followed more accurately (thanks @rbozan #2106 )
2016-04-05 23:04:31 +01:00
photonstorm
8ad7b25595
The Debug canvas now listens for the ScaleManager.onSizeChange signal and resizes itself accordingly when running under WebGL. This means if your game size changes the Debug canvas won't be clipped off (thanks @francisberesford #1919 )
2016-04-05 21:52:11 +01:00
photonstorm
7b803135c8
Updated jsdocs for getBounds ( #2406 )
2016-04-05 21:13:04 +01:00
Jake Wilson
96a79cd91a
Added warning if physics body is enabled on unknown physics system.
2016-04-05 11:23:17 -04:00
photonstorm
b3e6381a9e
Tween.update wouldn't dispatch an onLoop
signal for Tweens with just one child, such as those created via Tween.to with -1 as the repeat value (thanks @ForgeableSum #2407 )
2016-04-05 01:11:50 +01:00
photonstorm
917d9c7060
TweenData.repeatTotal is a new property that keeps track of the total number of times the Tween should repeat. If TweenData.start is called, as a result of the Tween repeatCount being > 0 then the child tween resets its total before re-starting.
2016-04-05 01:06:05 +01:00
photonstorm
f9949166be
Text that used fonts which had numbers in their names wouldn't be correctly rendered unless you explicitly set the font property after creation. You can now pass font names with numbers in them as the font style object correctly (thanks @And-0 #2390 )
2016-04-04 23:20:04 +01:00
Jake Wilson
ca13a82acb
Added Tileset name to tile size warning.
2016-04-04 18:10:53 -04:00
photonstorm
bc4b828b51
BitmapData.copy, and by extension draw, drawFull, drawGroup, etc, would incorrectly handle drawing a tinted Sprite if it was using a frame from a texture atlas (thanks @PhaserDebugger #2405 )
2016-04-04 22:53:13 +01:00
photonstorm
f40cfbe2ae
2015 - 2016.
2016-04-04 22:16:16 +01:00
photonstorm
12f3bd6cc5
The Destroy component will now call TweenManager.removeFrom, removing any active tweens from the TweenManager upon the Game Objects destructions (thanks @PokemonAshLovesMyTurkeyAndILikeYouTwo #2408 )
...
Tween.update will now return `false` (flagging the Tween for destruction) should the Tween.target property every become falsey. This can happen if the object the Tween was tracking is destroyed, nulled or generally removed..
2016-04-04 22:06:16 +01:00
photonstorm
d6942991bc
Docs update (in light of browser extensions causing us grief)
2016-04-04 22:06:15 +01:00
Richard Davey
8e880eddee
Merge pull request #2402 from jakewilson/dev
...
Added ability to kill a Game Object when it leaves camera bounds.
2016-04-04 21:52:30 +01:00
Richard Davey
4298b2caae
Merge pull request #2368 from Weedshaker/patch-2
...
AudioBufferSourceNode - same issue as on play:
2016-04-04 21:48:20 +01:00
photonstorm
63b3b3e887
Negative lineSpacing in Text objects will no longer crop the bottom pixels off lines of text (thanks @gaelenh #2379 #2374 )
2016-04-04 21:36:37 +01:00
Richard Davey
3c3ca5b515
Merge pull request #2394 from zeterain/patch-5
...
Check for sprite destruction in onInputDown event.
2016-04-04 21:29:59 +01:00
photonstorm
f9ff892510
Formatting.
2016-04-04 21:25:21 +01:00
photonstorm
723f94cd3b
Updated docs.
2016-04-04 21:21:30 +01:00
Richard Davey
07adad9ae8
Merge pull request #2395 from sergey7c4/dev
...
Fixed issue #2317
2016-04-04 21:20:01 +01:00
Richard Davey
1528d54a38
Merge pull request #2397 from rblopes/remove-from-hash-issue
...
Ensure a parent container is a Group before removing from its hash.
2016-04-04 20:47:31 +01:00