Paul Salaets
79f550bc89
updating comments: default color and method name
2014-07-05 18:08:00 -04:00
Paul Salaets
0694dab909
reorder param list to be consistent with comment's ordering and other code
2014-07-05 17:50:13 -04:00
photonstorm
da822ab207
Fixing anchor issue :)
2014-07-03 17:21:06 +01:00
photonstorm
14109aeeb1
Animation.next will advance to the next frame in the animation, even if it's not currently playing. You can optionally define the number of frames to advance, but the default is 1. This is also aliased from the AnimationManager, so you can do Sprite.animations.next()
.
...
Animation.previous will rewind to the previous frame in the animation, even if it's not currently playing. You can optionally define the number of frames to rewind, but the default is 1. This is also aliased from the AnimationManager, so you can do `Sprite.animations.previous()`.
2014-07-03 16:23:36 +01:00
photonstorm
7c624f409f
Updated console.log and README.
2014-07-03 10:50:26 +01:00
photonstorm
e0b5e94f45
Fixed _destroy issue in Signal.
2014-07-03 10:50:12 +01:00
photonstorm
86f972a765
Updated to latest Pixi dev branch.
2014-07-03 10:49:58 +01:00
photonstorm
177d51f238
Signal.removeAll now has a new context
parameter. If specified only listeners matching the given context are removed (thanks @lucbloom for the idea, #880 )
2014-07-03 02:22:11 +01:00
photonstorm
92dbabb2df
Camera.updateTarget has had a make-over and now is a lot smoother under certain conditions (thanks @tjkopena, fix #966 )
2014-07-03 02:09:53 +01:00
photonstorm
6e94aa7cde
Updated applyForce docs.
2014-07-02 16:29:30 +01:00
photonstorm
8b160a1eb1
Tidied up formatting and docs.
2014-07-02 15:25:07 +01:00
photonstorm
8c41f6cc10
Game.onBlur and Game.onFocus events are now dispatched regardless if Stage.disableVisibilityChange is true or false, so you can respond to these events without your game automatically pausing or resuming ( #911 )
2014-07-02 14:57:28 +01:00
photonstorm
2916f0413f
Group.bringToTop (and consequently Sprite.bringToTop) no longer removes the child from the InputManager if enabled (thanks @BinaryMoon, fix #928 )
...
Group.sendToBack (and consequently Sprite.sendToBack) no longer removes the child from the InputManager if enabled.
Group.add has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.addAt has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.remove has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onRemovedFromGroup` event.
Group.removeBetween has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Group.removeAll has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Internal child movements in Group (such as bringToTop) now uses the new `silent` parameter to avoid the child emitting incorrect Group addition and deletion events.
2014-07-02 14:04:14 +01:00
photonstorm
2cef655ed6
Calling Tween.stop from inside a Tween update callback would still cause the tween onComplete event to fire (thanks @eguneys, #924 )
2014-07-02 05:47:38 +01:00
photonstorm
5ee9245acf
Rectangle.right when set would set the new width to be Rectangle.x + the value given. However the value given should be a new Right coordinate, so the width calculation has been adjusted to compensate (thanks @cryptonomicon, #849 )
2014-07-02 05:37:12 +01:00
photonstorm
58fc73348c
The StateManager has a preRenderCallback option, which checks for a preRender function existing on the State, but it was never called. Have decided to add this in, so the core Game loop now calls state.preRender right before the renderer runs (thanks @AnderbergE #869 )
2014-07-02 05:32:40 +01:00
photonstorm
c71ca3b849
Updated some Rectangle docs.
2014-07-01 22:10:13 +01:00
photonstorm
757136bf4f
Device.mobileSafari was no longer detecting Mobile Safari, now fixed (thanks @Zammy, #927 )
2014-07-01 19:19:49 +01:00
photonstorm
79bd7c400b
Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, #932 )
2014-07-01 16:57:55 +01:00
photonstorm
db22b019be
Swapped the ScaleManager creation order in Game, so both start and stop fullScreen requests work now.
2014-07-01 16:50:33 +01:00
Richard Davey
a127080794
Merge pull request #951 from sivael/dev
...
TileMap update performance
2014-07-01 16:17:20 +01:00
Richard Davey
dd11e2a5a9
Merge pull request #840 from villetou/WebAudioExternalNodeFix
...
Web audio external node fix
2014-07-01 16:06:08 +01:00
Richard Davey
de270908de
Merge pull request #958 from renatodarrigo/patch-2
...
Fix rawpad button array to support win and linux
2014-07-01 15:59:06 +01:00
Richard Davey
a425470f41
Merge pull request #925 from jonkelling/dev
...
Fix for issue #917 , Physics.P2.Body#addToWorld
2014-07-01 15:52:29 +01:00
photonstorm
d2fc42520b
stopFullScreen has been changed to run against document instead of the canvas since the cancelFullScreen method is created on the document (thanks @j0hnskot, #863 )
2014-07-01 15:46:32 +01:00
Richard Davey
e1bc2b7bd6
Merge pull request #912 from j0hnskot/onDecoded-patch
...
Fix for bug #906
2014-07-01 15:42:09 +01:00
Richard Davey
ba29d5bd4b
Merge pull request #910 from TatumCreative/dev
...
Fix null returns for play()
2014-07-01 15:39:17 +01:00
Richard Davey
117aef650b
Merge pull request #956 from Phaiax/phaserdts-createcollisiongroup
...
createCollisionGroup -> public, included in .d.ts file
2014-07-01 15:37:31 +01:00
Richard Davey
2fb9217776
Merge pull request #955 from Phaiax/issue952-p2bounds
...
P2 bottom world wall position fix
2014-07-01 15:36:02 +01:00
Richard Davey
1a0ebe6d26
Merge pull request #954 from Phaiax/issue953-bodydebug
...
inverting debug getter result
2014-07-01 15:35:35 +01:00
Richard Davey
3c191e4cea
Merge pull request #959 from woutercommandeur/dev
...
Add mouse wheel support
2014-07-01 15:33:34 +01:00
Richard Davey
3cbda52ca5
Merge pull request #960 from Phaiax/replaceRGBissue
...
replaceColor fix
2014-07-01 15:31:16 +01:00
Richard Davey
7fa3110c06
Merge pull request #961 from Phaiax/issue-bodyEnable
...
Body.enable only exists in Arcade physics, so move conditions concerning...
2014-07-01 15:27:33 +01:00
Richard Davey
cde51d3c95
Merge pull request #940 from alvinsight/dev
...
Added factorial and updated to pass jshint :)
2014-07-01 15:07:10 +01:00
photonstorm
181fd1ae56
Merged Pixi 1.5.4 with Phaser - all of the lovely new Pixi features are in, like complex Graphics objects and masking.
2014-07-01 15:03:46 +01:00
Phaiax
00bf349ff5
Body.enable only exists in Arcade physics, so move conditions concerning this into arcarde
2014-06-30 12:49:53 +02:00
photonstorm
3d80568e4c
Loader.isLoading is set to false if the filelist size is zero.
2014-06-30 09:24:25 +01:00
photonstorm
692ca928f0
Updated docs.
2014-06-29 21:19:37 +01:00
Phaiax
18229d1673
fix jshint warning
2014-06-29 18:23:43 +02:00
Phaiax
b14aff5844
Return type of Phaser.Color.packPixel changed
2014-06-29 18:02:59 +02:00
Wouter Commandeur
a863482439
Add constants for wheel up and down
2014-06-29 14:23:09 +02:00
Wouter Commandeur
7b8f08d5f9
appease travis
2014-06-29 13:49:45 +02:00
Wouter Commandeur
c716709f66
Add mouse wheel support
2014-06-29 13:45:39 +02:00
renatodarrigo
149016093c
Fix rawpad button array to support win and linux
...
On Linux, rawpad button array doesn't get populated with GamepadButton objects, so I made a check to verify if it is an object or a number, then pass the correct value to appropriate function.
Also, uncommented the axischange lines.
2014-06-28 04:11:55 -03:00
Phaiax
394e70db06
inverting debug getter result
2014-06-28 01:33:02 +02:00
Phaiax
441d0a816e
P2 bottom world wall position fix
2014-06-28 01:28:59 +02:00
Phaiax
961d25cadc
createCollisionGroup -> public, included in .d.ts file
2014-06-28 01:25:51 +02:00
sivael
cdaab269a0
Update Tilemap.js
2014-06-27 14:36:06 +02:00
sivael
7fb5c8cf5d
Update Tilemap.js
2014-06-27 14:25:56 +02:00
sivael
c7cae6ece7
Update Tilemap.js
2014-06-27 14:21:45 +02:00
sivael
05ce6f60a1
TileMap update performance
...
Discussion: http://www.html5gamedevs.com/topic/7409-tilemaps-changing/
It should remove the problem of updating stuff in a 100x100 tilemap making the engine recalculate every single update.(390 tiles changed in that map makes it a 100x100x390 loop.
Whould make the recalculate parameter in the setCollision functions unnecessary as well.
2014-06-27 14:10:11 +02:00
Richard Davey
56d1cef1c8
Merge pull request #941 from kay-is/master
...
Changed a @method string
2014-06-24 22:39:55 +01:00
Kay Plößer
4b7698d3e1
Changed a @method string so the documentation method name matches the code method name.
2014-06-24 14:16:38 +02:00
Alvin
6f0a9115c4
Made the code jshint-friendly
2014-06-24 11:26:05 +02:00
Alvin
9e2ca08722
Added factorial and changed interpolation docs
2014-06-24 11:23:20 +02:00
j0hnskot
5ef8143322
Fixes bug #906
2014-06-24 01:59:44 +03:00
Richard Davey
e74cedf73e
Merge pull request #936 from lewster32/patch-2
...
Fix checkPointerDown method
2014-06-23 23:45:08 +01:00
Richard Davey
e2578504e5
Merge pull request #937 from woutercommandeur/dev
...
fix checking of segment intersection no more rounding needed.
2014-06-23 23:40:55 +01:00
photonstorm
cd60554c78
Added P2 body anchor docs to clarify #938
2014-06-23 23:34:27 +01:00
Wouter Commandeur
5ebacd0b30
stop travis complaints
2014-06-23 22:59:47 +02:00
Wouter Commandeur
37dcfce628
fix checking of segment intersection no more rounding needed.
2014-06-23 20:25:47 +02:00
Lewis Lane
187387126d
Fix checkPointerDown method
...
checkPointerDown method was a verbatim duplication of checkPointerOver - added pointer.isDown check to passed pointer and altered wording of associated docs to make it clearer what the method is doing.
2014-06-22 23:03:15 +01:00
jonkelling
36d70697db
Fix for issue #917 , Physics.P2.Body#addToWorld
...
Fix for issue #917 : Calling reset() on Sprite with a P2 body can result in body.data.world == null.
Calling addToWorld() would previously not check the _toRemove array, which could, if the timing were right, result in a Sprite being revived but then removed from the P2 World--the result of this being the Sprite's data would be in a mixed state causing it to appear visually but not function in the world.
2014-06-17 21:53:20 -05:00
Greg Tatum
50f91eae54
Shape changed not called on removeShape
...
It looks like a bunch of these methods that modify the body don't call shapeChanged(). If you want I can add them all and resubmit.
2014-06-17 08:36:39 -05:00
j0hnskot
cb0d9c5a69
Fixes bug #906 by adding a check for isDecoded in the update loop.
2014-06-15 21:27:32 +03:00
j0hnskot
5aec4cff8f
Fixes bug #906 by adding a check for isDecoded in the update loop.
2014-06-15 21:23:13 +03:00
Greg Tatum
26a177d9a1
Fix null returns for play()
...
The play() method in the AnimationManager could return null for a valid animation name.
2014-06-14 23:59:57 -05:00
photonstorm
3888653022
Added new loadTexture and setFrame calls. Will test crop support.
2014-06-11 14:38:14 +01:00
photonstorm
c0b34eddda
Fixed PS3 mappings.
2014-06-11 14:37:58 +01:00
photonstorm
69525799d7
New build files for testing.
2014-06-11 12:46:49 +01:00
photonstorm
907ba55478
Huge number of gamepad updates to get it working properly on Chrome again. Firefox debugging tomorrow.
2014-06-11 04:25:30 +01:00
photonstorm
0587d944b3
Added PlayStation 3 controller button mappings to Phaser.Gamepad (thanks @wayfu #887 )
2014-06-11 00:25:58 +01:00
photonstorm
50e47d89ee
ArcadePhysics.Body.setSize if you set offset x/y values previously and then passed zero values they would be ignored (thanks @casensiom fix #889 )
2014-06-11 00:21:04 +01:00
photonstorm
e923e230e0
TilemapLayers can now be used with an unbounded camera (a camera that can move beyond the world boundaries). Currently, when an unbounded camera moves outside of the world, tilemaps start acting weird because they only render themselves strictly within the world limits. With this change, the tilemap will continue scrolling and show empty space beyond its edge (thanks @jotson #851 )
...
TilemapLayer.wrap property - if true the map is rendered as if it is on the surface of a toroid (donut) instead of a plane. This allows for games that seamlessly scroll from one edge to the opposite edge of the world without noticing the transition. Note that the World size must match the Map size (thanks @jotson #851 )
2014-06-11 00:15:02 +01:00
Richard Davey
fddd1e9f7a
Merge pull request #851 from jotson/dev
...
Render tilemap when camera outside of world bounds, layer wrapping
2014-06-11 00:05:23 +01:00
Richard Davey
13700148fb
Merge pull request #891 from aivins/issue890
...
Separate from TilemapLayer after custom callbacks.
2014-06-11 00:00:20 +01:00
Richard Davey
f433f20ca7
Merge pull request #892 from lewster32/patch-1
...
Added notes to overlap/collide regarding non-recursiveness
2014-06-10 23:58:02 +01:00
Richard Davey
bf48b1a6c3
Merge pull request #894 from lstor/dev
...
Fix getPixel for pixels with zero red value.
2014-06-10 23:52:26 +01:00
photonstorm
b979243a8d
Removed the cacheKey parameters from the AnimationParser methods as they're no longer used.
2014-06-10 23:50:12 +01:00
photonstorm
7c7d9153e6
Sprite.crop (and Image.crop) has been completely overhauled. You can now crop animated sprites (sprite sheet and texture atlas), you can define the x/y crop offset and the crop rectangle is exposed in the Sprite.cropRect property.
...
Sprite.updateCrop is available if you wish to update an externally referenced crop rectangle.
Sprites and Images now have their own textures objects, they are no longer references to those stored in the global Pixi.TextureCache. This allows you to redefine the texture frame dynamically without messing up any other Sprites in your game, such as via cropping. They still share global Base Textures, so image references are kept to a minimum.
Sprite.resetFrame will revert the Sprites texture frame back to its defaults dimensions. This is called when you call Sprite.crop with no rectangle, to reset the crop effect, but can be userful in other situations so we've left it as a public method.
2014-06-10 23:37:33 +01:00
photonstorm
6d10be6baa
When creating a Sprite or Image using a texture atlas it would set the frame twice, once in loadTexture and once when the initial frame is set. This has been reduced down to just a single setting now.
2014-06-10 11:21:07 +01:00
Lars Storjord
38e971c819
Fix getPixel for pixels with zero red value.
...
Remove an erroneous if that causes getPixel() to fail if the red value
of the pixel is zero.
Fixes #881 .
2014-06-09 23:34:06 +02:00
photonstorm
ee5f6457c8
Swapped to using escaped Unicode characters for the console output.
2014-06-09 16:15:41 +01:00
photonstorm
b3baaba1a1
setFrame updates.
2014-06-09 15:23:18 +01:00
Lewis Lane
a16cb3f5a2
Added notes to overlap/collide regarding non-recursiveness
...
Made it clear that the overlap and collide methods do not recursively check for collisions, i.e. in the case of being passed a Group containing other Groups or Tilemaps.
2014-06-09 08:05:23 +01:00
Andrew Ivins
ccd914620d
Separate from TilemapLayer after custom callbacks.
2014-06-09 14:28:14 +08:00
photonstorm
c0b3bd224e
Removed the Pixi texture cache calls.
2014-06-06 04:12:51 +01:00
photonstorm
7836f3acd9
Added RandomDataGenerator.between (an alias for integerInRange)
2014-06-06 04:12:35 +01:00
photonstorm
622978fa77
Finally managed to get crop x/y/width/height working across all texture types. Needs optimising for the trim rect, but works.
2014-06-06 04:12:16 +01:00
photonstorm
7d436a7dc3
Update to #868
2014-06-05 13:17:32 +01:00
photonstorm
9aa10f7521
Sound.pause will no longer fire a Sound.onStop signal, and the pause values are set before the onPause signal is dispatched (thanks @AnderbergE, fix #868 )
2014-06-05 02:55:20 +01:00
photonstorm
369e2cc2d0
Sound.destroy(true) would call remove on the SoundManager, which in turn would throw a TypeError as it tried to remove the sound events twice (thanks @AnderbergE, fix #874 )
2014-06-05 02:50:53 +01:00
photonstorm
b63900f669
Testing frame crop support.
2014-06-05 02:33:29 +01:00
Richard Davey
62dfd56983
Merge pull request #875 from JeanDavidDaviet/dev
...
updated doc for Phaser.Tilemap#createBlankLayer
2014-06-05 02:29:17 +01:00
JeanDavidDaviet
89f860ad46
Updated doc for Input#deleteMoveCallback
2014-06-04 20:36:56 +10:00
JeanDavidDaviet
a4b279b9cc
updated doc for Phaser.Tilemap#createBlankLayer
2014-06-04 19:01:10 +10:00
Momin Khan
b4d6044f14
Updated docs for Tween.onUpdateCallback to indicate that you can specify the context
2014-06-03 23:56:49 -04:00
photonstorm
1c9e23f535
Emitter.start has a new parameter: forceQuantity which will force the quantity of a flow of particles to be the given value (request #853 )
...
Emitter.explode is a new short-cut for exploding a fixed quantity of particles at once.
Emitter.flow is a new short-cut for creating a flow of particles based on the given frequency.
2014-06-02 01:15:58 +01:00
photonstorm
12252944fa
Time.add allows you to add an existing Phaser.Timer to the timer pool (request #864 )
2014-06-02 00:54:42 +01:00
photonstorm
1d428a7ca4
Recoded Gamepad detection to stop it breaking on FF.
2014-06-02 00:48:44 +01:00
Wouter Commandeur
266eb10765
Fix Phaser.Line.intersectsPoints for floating point inaccuracy. Round the result to 3 decimals, should be enough precision and solves the problems.
...
See: http://www.html5gamedevs.com/topic/6840-phaserlineintersects-does-not-work-for-floats/
2014-05-31 12:13:59 +02:00
photonstorm
1e9d0b2438
Tidying up.
2014-05-30 05:33:30 +01:00
photonstorm
917c7491cd
Canvas.create has deprecated the noCocoon parameter as it's no longer required. The parameter is still in the signature, but no longer used in the method.
2014-05-30 02:03:07 +01:00
photonstorm
6e8694d5f7
A Canvas style set from a game config object used an incorrect property (thanks @TatumCreative, fix #861 )
2014-05-30 02:01:33 +01:00
photonstorm
edc1507b4e
Resolved issue where Cocoon won't render a scene in Canvas mode if there is only one Sprite/Image on it.
2014-05-29 23:52:13 +01:00
photonstorm
eee1183a6a
Forces use of a Canvas Renderer under CocoonJS automatically.
...
The SoundManager no longer requires a touch to unlock it, defaults to unlocked.
2014-05-29 23:17:18 +01:00
photonstorm
0c675f741f
Wrapped all events that CocoonJS doesn't support in conditional checks to avoid Cocoon Warnings.
2014-05-29 22:25:40 +01:00
photonstorm
5b5bdc80d9
Loader.pack will allow you to load in a new Phaser Asset Pack JSON file. An Asset Pack is a specially structured file that allows you to define all assets for your game in an external file. The file can be split into sections, allowing you to control loading a specific set of files from it. An example JSON file can be found in the resources
folder and examples of use in the Phaser Examples repository.
...
Loader.totalQueuedPacks returns the number of Asset Packs in the queue.
Loader.totalLoadedPacks returns the number of Asset Packs already loaded.
2014-05-29 17:05:13 +01:00
photonstorm
4004cc92e3
First working pass at the Asset Pack Loader update.
2014-05-29 15:57:47 +01:00
photonstorm
066ab633a6
Loader.tilemap has renamed the mapURL
parameter to url
and mapData
to data
to keep it consistent with the other Loader methods.
...
Loader.physics has renamed the `dataURL` parameter to `url` and `jsonData` to `data` to keep it consistent with the other Loader methods.
2014-05-29 04:44:23 +01:00
photonstorm
af1508de8f
BitmapData.addToWorld will create a new Phaser.Image object, assign the BitmapData to be its texture, add it to the world then return it.
...
BitmapData.copyPixels now accepts a Sprite, Image, BitmapData, HTMLImage or string as its source.
2014-05-29 03:30:21 +01:00
photonstorm
2219e6f1c9
Timer.ms would report the game time ms value if the Timer hadn't yet been started, instead of 0.
...
Timer.seconds would report the game time value if the Timer hadn't yet been started, instead of 0.
2014-05-28 23:27:26 +01:00
photonstorm
30cf226fc2
Rebuild on offset change.
2014-05-28 01:08:28 +01:00
John Watson
14e1f0fcc6
Render tilemap when camera outside of world bounds, layer wrapping
...
Prior to this change, TilemapLayers always restricted themselves to
rendering strictly within the world bounds. If the camera was allowed
to go beyond the world bounds, then the tilemap would appear to stop
scrolling once the camera hit the world edge. This allows the tilemap
to continue scrolling, showing empty space beyond the edge of the map.
Additionally, when the new "wrap" parameter is true, the tilemap will
render its opposite edge in the empty space. This simulates the map as
if it was the surface of a toroid (donut) rather than a flat plane.
2014-05-27 14:51:44 -07:00
photonstorm
0c76e9aada
Sprite animation data wasn't reset when going from a sprite sheet to a single frame in Sprite.loadTexture (thanks @lucbloom, fix #850 )
2014-05-27 14:23:41 +01:00
photonstorm
5a0d5b4887
RetroFont now uses Phaser.scaleModes.NEAREST by default for its RenderTexture to preserve scaling.
2014-05-27 13:36:38 +01:00
photonstorm
cdde45a292
Phaser.RenderTexture incorrectly passed the scaleMode to Pixi.RenderTexture, causing the renderer to error.
2014-05-27 13:35:47 +01:00
photonstorm
8d94b4a91c
Swapped keypress callback order.
2014-05-27 11:32:18 +01:00
photonstorm
9c35dfde0c
ArcadePhysics.Body has a new boolean property enable
. If false
the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself.
2014-05-27 11:22:58 +01:00
photonstorm
5b9bd96583
RetroFont.updateOffset allows you to modify the offsetX/Y values used by the font during rendering.
2014-05-27 05:23:34 +01:00
photonstorm
890d90af4d
Keyboard.addCallbacks now has a new parameter for keypress event capture.
...
Keyboard.pressEvent stores the most recent DOM keypress event.
Keyboard.processKeyDown now runs the callback after all the objects have been created and/or updated.
Keyboard.processKeyUp now runs the callback after all the objects have been created and/or updated.
Phaser.Keyboard.lastChar will return the string value of the last key pressed.
Phaser.Keyboard.lastKey will return the most recently pressed Key object.
2014-05-27 04:26:37 +01:00
photonstorm
68f1bbd9a5
RetroFont charsPerRow paramters is now optional. If not given it will take the image width and divide it by the characterWidth value.
2014-05-27 04:26:23 +01:00
photonstorm
f007a77f3d
Fixed Gamepad issue that incorrectly checked non-webkit prefix gamepads.
2014-05-26 22:02:53 +01:00
photonstorm
cd963242cd
jshint fix + draw sprite fix
2014-05-26 20:15:11 +01:00
photonstorm
86c228d380
Group.destroy now removes any set filters (thanks @Jmaharman fix #844 )
2014-05-26 20:13:00 +01:00
photonstorm
c5d9f12858
BitmapData.alphaMask has 2 new optional parameters: sourceRect and maskRect to give more fine-grained control over where the source and mask are drawn and their size
...
BitmapData.draw now has two optional parameters: width and height, to let you stretch the image being drawn if needed.
2014-05-24 03:58:00 +01:00
photonstorm
7846da7c90
BitmapData.alphaMask 'mask' parameter is now optional, if not given it will use itself as the mask.
...
BitmapData.alphaMask now calls BitmapData.update after running.
2014-05-24 03:17:58 +01:00
photonstorm
6e9c9c10b8
BitmapData.alphaMask can now also take a Phaser.Sprite, Phaser.Image or BitmapData object as a source type.
...
BitmapData.alphaMask has 4 new optional parameters: x, y, x2 and y2 to control exactly where the source and mask images are drawn.
2014-05-24 03:15:13 +01:00
photonstorm
be66a694a8
jsdoc and jshint fixes.
2014-05-24 02:53:48 +01:00
photonstorm
f3ef3aed19
BitmapData.draw can now take a BitmapData object as a source type.
2014-05-24 02:43:59 +01:00
photonstorm
934f6a816c
BitmapData.resize now properly updates the baseTexture and texture dimensions.
2014-05-24 02:02:49 +01:00
photonstorm
7b696dddfe
BitmapData.extract has 4 new parameters: r2, g2, b2, a2 which let you re-color the extract pixels as they are drawn to the new BitmapData.
...
BitmapData.load will take a game object or string and resize the BitmapData to match it and then draw the pixels in.
2014-05-24 01:29:47 +01:00
photonstorm
bcddfc83c0
Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841 )
2014-05-21 21:48:29 +01:00
Ville Touronen
2e7c8de118
Fixed connecting to an externalNode in Sound.play() and Sound.resume().
2014-05-21 00:09:46 +03:00
photonstorm
2a73652ed8
Preparing for 2.0.6 "Jornhill" development.
2014-05-20 10:56:45 +01:00
photonstorm
43e079a53a
Readme update.
2014-05-20 10:31:55 +01:00
photonstorm
88306b6e12
P2 World array reset fix.
2014-05-20 10:03:00 +01:00
Richard Davey
00819626fc
Merge pull request #835 from draklaw/tilemap-removeTile-fix
...
Tilemap removeTile sets tiles to null
2014-05-20 00:09:28 +01:00
photonstorm
a8256f4ef7
defs typo fix
2014-05-20 00:08:39 +01:00
Simon Boyé
7e43248412
Fixed Tilemap.removeTile issue to put tile of index -1 instead of null.
2014-05-19 22:58:52 +02:00
photonstorm
7b876d5fc4
ScaleManager.bounds is a Rectangle object that holds the exact size of the game canvas, taking DOM offset and game scale into account.
...
Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves.
Stage.bounds is now updated if the game canvas offset changes position. Note that it gives the un-scaled game dimensions.
2014-05-19 18:49:59 +01:00
photonstorm
c9656e48de
Group.hasProperty fixed to not use hasOwnProperty, but a series of in
checks (thanks @mgiuffrida for the idea, #829 )
2014-05-19 13:11:58 +01:00
Richard Davey
ee30dd634a
Merge pull request #831 from woutercommandeur/dev
...
Add movement data for pointerlocked mouse
2014-05-19 11:48:25 +01:00
photonstorm
da75a22e82
Cache.checkKey added - allows you to pass in a Cache type and a key and return a boolean.
...
Cache.checkCanvasKey(key) - Check if a Canvas key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextureKey(key) - Check if a Texture key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkSoundKey(key) - Check if a Sound key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextKey(key) - Check if a Text key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkPhysicsKey(key) - Check if a Physics key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTilemapKey(key) - Check if a Tilemap key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBinaryKey(key) - Check if a Binary key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapDataKey(key) - Check if a BitmapData key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapFontKey(key) - Check if a BitmapFont key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkJSONKey(key) - Check if a JSON key exists in the cache (thanks to @delta11 for the proposal)
2014-05-19 11:34:14 +01:00
Wouter Commandeur
ce34da80c6
Only update movement when mouse is locked
2014-05-17 12:01:40 +02:00
Wouter Commandeur
e041eea968
whitespace adjustments
2014-05-17 11:32:11 +02:00
Wouter Commandeur
449c7ebfb0
Add mouse movement to pointer. This should be used with pointerLock.
2014-05-17 11:27:31 +02:00
photonstorm
cfadaf3e70
Tilemap.layer is a getter/setter to the current layer object (which can be changed with Tilemap.setLayer)
2014-05-15 22:30:32 +01:00
photonstorm
1d13855abb
Tilemap.searchTileIndex allows you to search for the first tile matching the given index, with optional skip and reverse parameters.
2014-05-15 19:56:56 +01:00
photonstorm
3f3655a138
jshint fix
2014-05-15 15:38:28 +01:00
photonstorm
2650e6c47e
RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
...
RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
2014-05-15 15:32:59 +01:00
Richard Davey
21011c3d03
mouseout handler
2014-05-14 22:56:42 +01:00
photonstorm
5d8a11ae29
Input.addMoveCallback allows you to bind as many callbacks as you like to the DOM move events (Input.setMoveCallback is now flagged as deprecated)
...
Input.deleteMoveCallback will remove a previously set movement event callback.
2014-05-14 03:01:24 +01:00
photonstorm
b90bcc442c
If an object was drag enabled with bringToTop, the onDragStop event wouldn't fire until the mouse was next moved (thanks @alpera, fix #813 )
2014-05-14 02:42:55 +01:00
photonstorm
bdcc9fcbc4
Updated jsdocs re: Image/Sprite.crop ( #820 )
2014-05-14 02:18:18 +01:00
photonstorm
cc9a234c8c
Color.getRGB would return incorrect color components if a color value without alpha was given, now works with both 0xRRGGBB and 0xAARRGGBB.
...
Color.getWebRGB now works regardless if you give an 0xRRGGBB or 0xAARRGGBB color value.
2014-05-14 02:09:44 +01:00
photonstorm
798d7a4fd1
Stage.backgroundColor now properly accepts hex #RRGGBB and color values 0xRRGGBB again ( fix #785 )
2014-05-14 01:59:21 +01:00
photonstorm
0bfa249ed5
Key.justPressed and justReleased incorrectly set the delay value to 2500ms. Now defaults to 50ms (thanks @draklaw, fix #797 )
2014-05-14 00:24:09 +01:00
Richard Davey
5770b654a6
Merge pull request #791 from tigermonkey/dev
...
[tilemap] parse polygon, ellipses and rectangles
2014-05-14 00:06:53 +01:00
photonstorm
b2c68c1369
Graphics.drawTriangles will draw an array of vertices to the Graphics object (thanks @codevinsky, #795 )
...
Polygon.area will calculate the area of the Polygon (thanks @codevinsky, #795 )
2014-05-14 00:04:31 +01:00
photonstorm
5047606118
Button.onOverMouseOnly is a boolean that causes onOver events to fire only if the pointer was a mouse (i.e. stops onOver sounds triggering on touch)
2014-05-13 23:43:44 +01:00
Richard Davey
e3f834314e
Merge pull request #795 from codevinsky/graphics-drawTriangles
...
Graphics.drawTriangles and Polygon.area
2014-05-13 23:43:16 +01:00
Richard Davey
335ff53390
Merge pull request #819 from max-m/patch-1
...
Improve TileMap's setCollsion functions
2014-05-13 23:38:07 +01:00
Maximilian Mader
d7ba7b3a62
Improve TileMap's setCollsion functions
...
Now one can decide in 'setCollision', 'setCollisionBetween', 'setCollisionByExclusion' and 'setCollisionByIndex' to recalculate the collision faces or not.
I was able to decrease the time it takes to set the collisions from 1880ms to 440ms in my case,see http://www.html5gamedevs.com/topic/6328-camera-rendered-area-move-tilemaplayer/?p=38037
2014-05-12 17:42:54 +02:00
Georgios Kaleadis
d032d71938
happy semicolon, do not cry jshint 😭
2014-05-11 12:56:38 +02:00
Georgios Kaleadis
03849162a8
ensure that phaser never overrides an existing pixi class
2014-05-11 10:34:13 +02:00
Samuel Batista
d5366972bc
Typo fix
2014-05-10 02:15:16 -04:00
photonstorm
86f6b114e8
Sound.stop on Samsung S4 would randomly throw a DOM error. Wrapped the audio stop in a try/catch (thanks FSDaniel)
2014-05-09 16:39:45 +01:00
photonstorm
78ec29facc
RandomDataGenerator.integerInRange would return a non-integer value if you passed in a float.
2014-05-09 16:39:45 +01:00
photonstorm
e06f249d9b
Commented out 2 functions that don't currently work.
2014-05-09 16:39:45 +01:00
photonstorm
bac618e842
jsdoc updates.
2014-05-09 16:39:45 +01:00
photonstorm
8b1e736418
BitmapData.rect provides a quick way to draw a Rectangle to a BitmapData.
2014-05-09 16:39:45 +01:00
Joel Robichaud
48acfff3cd
Fixed a problem with the Timer class where a timer that is _codePaused after a game pause would not be considered to be _codePaused.
2014-05-09 10:33:38 -04:00
Joel Robichaud
936d38cfdb
Fixed a problem with the Timer class wheere the total pause time would be incorrect after unpausing it twice in a row (game pause followed by code pause).
2014-05-09 10:33:29 -04:00
Joe Flowers
821da772aa
Updates Silk UA test to avoid Safari conflict
2014-05-08 00:28:27 -04:00
photonstorm
a60246d3c2
typeof fix.
2014-05-08 02:25:53 +01:00
photonstorm
c32706f98c
Phaser.Utils.transposeArray will transpose the given array and return it.
...
Phaser.Utils.rotateArray will rotate the given array by 90 or 180 degrees in either direction and return it.
2014-05-08 02:17:37 +01:00
photonstorm
5eb7ae2cb0
Plugins moved to their own new repo.
2014-05-08 01:57:21 +01:00
photonstorm
410bc389ed
Tidying up ready to move the plugins to their own repo.
2014-05-08 01:57:21 +01:00
Richard Davey
aac4ff2226
Merge pull request #808 from muclemente/dev
...
Added undefined check processPixelRGB
2014-05-07 23:48:28 +01:00
Richard Davey
570e8acabb
Joystick updates.
2014-05-07 18:10:13 +01:00
Richard Davey
281e84ee9b
Start of the Virtual Joystick plugin.
...
Fixes to Point.angle.
2014-05-07 16:35:08 +01:00
Murilo Clemente
c882ebef2f
Added undefined check processPixelRGB
...
Phaser.BitmapData#processPixelRGB:
I was getting an undefined error when phaser tried to call setPixel32
using “result.r”.
With this additional undefined check the problem stopped and I’m able
to run this method with all my needed images.
2014-05-06 22:43:35 -03:00
photonstorm
041bbd430c
Tilemap.getTile has a new nonNull parameter. If true it won't return null
for empty tiles, but will return the actual Tile in that location.
2014-05-07 01:30:48 +01:00
photonstorm
6070bc63bc
Sound.play now returns the Sound object (thanks @AnderbergE, fix #802 )
2014-05-07 00:12:41 +01:00
photonstorm
c94e842c75
InputManager.minPriorityID lets you set the minimum priority level an object needs to be to be checked by a Pointer. Useful for UI layer stacking.
2014-05-07 00:11:28 +01:00
photonstorm
ebd608939a
PluginManager.add now accepts additional parameters and if given a function it will pass them all to the Plugin constructor.
2014-05-07 00:11:02 +01:00
photonstorm
91f8f96a76
TilemapWalker allows you to set a location marker into a tilemap. You can then move around with commands such as moveForward, turnLeft, etc.
...
New consts: Phaser.Tilemap.NORTH, SOUTH, EAST and WEST to use with the TileMapWalker Plugin.
2014-05-07 00:10:48 +01:00
photonstorm
2b40c8a7c7
Pointer.type and Pointer.exists properties added.
...
QuadTree.retrieve can now accept either a Sprite with a physics body or a Phaser.Rectangle as its parameter.
ArcadePhysics.getObjectsUnderPointer will return all children from a Group that overlap with the given Pointer.
2014-05-06 02:45:10 +01:00
jdowell
f10c772ff3
Graphics.drawTriangles && Polygon.area
...
Demo:
http://phaser-triangles.herokuapp.com
2014-05-02 12:30:49 -05:00
photonstorm
ad7e2aff1f
Input.getPointerFromId will return a pointer with a matching pointerId value, if any. pointerId is a value set by the browser in the DOM event.
2014-05-02 12:21:57 +01:00
photonstorm
842abb82d3
Pointer.pointerId added which is set by the DOM event (if present in the browser). Note that browsers can and do recycle pointer IDs.
2014-05-02 12:14:05 +01:00
Richard Davey
776e384b27
Merge pull request #792 from codevinsky/tween-from
...
Phaser.Tween.from
2014-05-01 23:50:07 +01:00
photonstorm
4466b3cd5d
Input.getPointerFromIdentifier docs update to reflect where the identifier comes from. Pointer properties now set to give it fixed defaults (thanks @JirkaDellOro, #793 )
2014-05-01 23:35:40 +01:00
jdowell
224553ed21
Phaser.Tween.from
...
Added a reverse tweening function that will accept properties of where you want to start the tween from and will end the tween at the current property or properties that are passed in.
Usage:
```language-javascript
var sprite = game.add.sprite(game.world.centerX, game.world.centerY, 'yeoman');
game.add.tween(sprite).from({x: 0 - sprite.width}, 1000, Phaser.Easing.Bounce.Out, true);
```
2014-05-01 10:34:14 -05:00
Richard Davey
474924db94
Merge pull request #790 from woutercommandeur/dev
...
Fix Phaser.Line.intersectsPoints by properly checking the boundaries
2014-05-01 12:28:46 +01:00
Pablo Barbáchano
7f733a0b82
[tilemap] parse polygon, ellipses and rectangles
2014-05-01 13:13:53 +02:00
photonstorm
1f24d95e1a
New force
parameter added to Group.set, setAll, setAllChildren, setProperty which controls if a property is created even if it doesn't exist.
...
Group.hasProperty will check a child for the given property and return a boolean.
2014-05-01 11:45:17 +01:00
photonstorm
422e769a3e
Tilemap.createFromObjects will now force the creation of the property again even if it doesn't exist (regression fix from 2.0.4)
2014-05-01 11:42:15 +01:00
Wouter Commandeur
cc102a1924
Fix Phaser.Line.intersectsPoints by properly checking the boundaries
2014-05-01 11:28:00 +02:00
photonstorm
032fc11576
Emitter.makeParticles updated to use Array.isArray() check on the key/frame values, so non-string objects can be passed in (thanks @AnderbergE, fix #786 )
2014-05-01 02:41:53 +01:00
photonstorm
69c868f67d
Moved the this._reversed flag outside of the property loop in Tween (as per tween.js issue 115)
2014-05-01 02:40:36 +01:00
photonstorm
bd4c2176f0
Added an additional tile index check to P2.World.convertTilemap.
2014-05-01 02:40:17 +01:00
photonstorm
fd9d454bc6
Documentation updates.
2014-05-01 02:38:12 +01:00
photonstorm
b40769019b
The P2 DistanceConstraint method signature has changed. Updated Phaser so maxForce is now passed as object ( fix #788 )
2014-04-30 16:54:56 +01:00
Wouter Commandeur
fbd6d9c33e
Fix pointOnLine
...
Corrected algorithm via: http://stackoverflow.com/questions/11907947/how-to-check-if-a-point-lays-on-a-line-between-2-provided-points
2014-04-30 11:50:01 +02:00
photonstorm
55dc748953
Tilemap.getTile and getTileXY used to return null
in 2.0.3 but returned a Tile object in 2.0.4 (with an index of -1), they now return null
again.
2014-04-29 21:28:14 +01:00
photonstorm
fa613c5fe1
ScaleManager seeds _check private var with null to avoid later comparison check (thanks @jflowers45, fix #782 )
...
P2.Body.applyForce should have used pxmi instead of pxm (thanks @Trufi, fix #776 )
P2 fixed creation of RevoluteConstraint by passing maxForce in the options (thanks @woutercommandeur, fix #783 )
2014-04-29 19:34:38 +01:00
Wouter Commandeur
b1953bd0a0
fix creation of RevoluteConstraint by passing maxForce in the options
2014-04-29 20:12:56 +02:00
photonstorm
eb86f612b3
Prep for 2.0.5 development.
2014-04-29 16:25:10 +01:00
photonstorm
9fd4ac5950
Fixed and tested on IE9.
2014-04-29 15:38:33 +01:00
photonstorm
75a848f0ef
Loader now uses XDomainRequest in IE9 to load JSON data to help with CORS issues.
2014-04-29 14:41:26 +01:00
photonstorm
1d37cde66f
Updated p2 to latest build and patched for Float32Array + UMD issues.
2014-04-29 02:34:16 +01:00
photonstorm
937085afda
Added Uint32Array polyfill for BitmapData manipulation, and optional dataview polyfill for IE9 P2 requirements in the resources folder.
2014-04-29 02:09:58 +01:00
photonstorm
b32312dca5
Animation.setFrame allows you to set the animation to a specific frame (thanks @adamholdenyall, #706 )
2014-04-28 23:35:08 +01:00
photonstorm
74108148ac
CSV Tilemap tiles would incorrectly set the Tile layer reference, causing collision to fail (thanks @Chapelin, fix #692 )
2014-04-28 23:21:57 +01:00
photonstorm
add6b3966c
jshint fix
2014-04-28 21:22:11 +01:00
photonstorm
a5cbd8f2a6
Fixed an issue where Sounds that had been paused via game code would un-mute if the game paused and resumed.
2014-04-28 20:30:47 +01:00
photonstorm
15c9621402
Timer._now seeded on creation.
2014-04-28 15:25:05 +01:00
photonstorm
e85bbf8bc5
Text.updateText now sets the lineCap to round
to avoid occassional font glitching issues in Chrome.
2014-04-28 15:17:47 +01:00
photonstorm
360d744472
Camera.unfollow allows you to easily unfollow a tracked object (thanks @alvinsight, #755 )
2014-04-28 14:56:48 +01:00
photonstorm
8812d20162
Testing some small time tweaks.
2014-04-28 14:52:09 +01:00
Gaëtan Renaudeau
1f948d8994
Fix #771 : make smoothstep(x,a,b) work if a > b
2014-04-28 15:16:51 +02:00
photonstorm
f12168a888
Fixed jshint error.
2014-04-28 13:48:23 +01:00
photonstorm
e9436293a8
Tilemap.addTilesetImage will now raise a console.warn if you specify an invalid tileset key and not create the tileset rather than pick the default set.
2014-04-28 13:47:27 +01:00
photonstorm
348e3c14bd
LoaderParser.bitmapFont updated so xml parsing works properly on IE9 (thanks @georgiee)
2014-04-28 13:35:30 +01:00
photonstorm
838027a93b
Timer.timeCap is a new setting allowing your Timers to protect against unexpectedly large delta timers.
2014-04-28 13:22:29 +01:00
photonstorm
95fe57e4fe
BitmapData.extract working :)
2014-04-28 05:33:52 +01:00
photonstorm
de9fc08e7d
Color.updateColor - updates an existing color object to update the rgba property.
...
Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel, you can optionally set the saturation and value amounts.
Color.HSLColorWheel will return an array with 360 color objects for each segment of an HSL color wheel, you can optionally set the saturation and lightness amounts.
2014-04-28 04:19:26 +01:00
photonstorm
27d62aa147
Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel.
2014-04-28 03:25:45 +01:00
photonstorm
65022ccc55
Blank Tilemaps no longer create null
tiles, but instead create Tile objects with an index of -1 which can be replaced and updated like any other tile.
...
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:42:38 +01:00
photonstorm
b1153299c0
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:23:07 +01:00
photonstorm
ce6215c98a
Improved the docs to do with Sound duration / durationMS and added the extra output to the Debug.soundInfo (issue #630 )
2014-04-28 02:08:19 +01:00
photonstorm
3f23b3dc52
Fixed issue where Animations resuming from a pause would skip frames (thanks @merixstudio, fix #730 )
2014-04-28 01:48:46 +01:00
photonstorm
1ef617ca82
Updated Tilemap.destroy documentation to clarify layer removal (issue #740 )
2014-04-28 01:39:45 +01:00
photonstorm
3a86d3ccfc
Timer resume catch-up moved out of the core Time loop.
2014-04-28 01:17:39 +01:00
photonstorm
174bfa9b95
Game Pause / Resume Timer issues resolved. Doing a commit with all the debugging in so I can roll-back if needed.
2014-04-28 01:05:30 +01:00
photonstorm
1d48b3c5f2
Your State can now have a pauseUpdate method, which is called constantly when the game is paused.
...
The Input system is now updated even while the game is paused.
2014-04-28 00:07:40 +01:00
photonstorm
f15c17ba41
jshint fixes
2014-04-27 12:10:29 +01:00
photonstorm
6e5415fc31
Point.interpolate - Interpolates the two given Points, based on the f
value (between 0 and 1) and returns a new Point.
2014-04-27 11:16:06 +01:00
photonstorm
8dd67ea6ec
Point.dot - get the dot product of two Point objects.
...
Point.cross - get the cross product of two Point objects.
Point.cross - get the cross product of two Point objects.
Point.perp - make the Point perpendicular (90 degrees rotation)
Point.rperp - make the Point perpendicular (-90 degrees rotation)
Point.normalRightHand - Right-hand normalize (make unit length) a Point.
Point.angle - Returns the angle between this Point object and another object with public x and y properties.
Point.angleSq - Returns the angle squared between this Point object and another object with public x and y properties.
Point.getMagnitudeSq - Calculates the length squared of the Point object.
Point.project - Project two Points onto another Point.
Point.projectUnit - Project two Points onto a Point of unit length.
Point.multiplyAdd - Adds two 2D Points together and multiplies the result by the given scalar.
Point.negative - Creates a negative Point.
2014-04-27 11:09:57 +01:00
photonstorm
6e0c182fa5
Added _startHeight mod, but disabled until further testing.
2014-04-27 10:17:37 +01:00
photonstorm
7a64f53006
Fixed Polygon.contains for coordinates to the left of the polygon (thanks @vilcans, fix #766 )
2014-04-27 09:56:29 +01:00
photonstorm
2cba2a0e2b
Point.dot - get the dot product of two Point objects.
...
Point.cross - get the cross product of two Point objects.
Point.cross - get the cross product of two Point objects.
Point.perp - make the Point perpendicular (90 degrees rotation)
Point.rperp - make the Point perpendicular (-90 degrees rotation)
2014-04-26 20:35:31 +01:00
photonstorm
bcd64fd44b
More Timer tests.
2014-04-26 16:16:18 +01:00
photonstorm
b0afc562b5
And take 3
2014-04-25 20:01:09 +01:00
photonstorm
3db5d27c82
ArrayList.callAll check added (ping @jflowers45 #746 )
2014-04-25 19:38:10 +01:00
photonstorm
b6c2b4e0bf
Updated to [Pixi.js 1.5.3]( https://github.com/GoodBoyDigital/pixi.js/releases/tag/v1.5.3 )
2014-04-25 16:55:09 +01:00
photonstorm
29040b39d7
Tidied up the ArrayList. May rename to Stack?
2014-04-25 15:24:55 +01:00
photonstorm
54b71ddc23
Phaser.ArrayList is a new iterative object, similar in principal to a linked list but operating on a single array without modifying the object structure.
...
Input and Pointer now use the new ArrayList instead of a LinkedList, which resolve list item removable during callback issues.
Input.reset no longer resets every interactive item it knows of, because they are removed during the destroy phase and can now persist between States if needed.
2014-04-25 15:11:54 +01:00
photonstorm
45aa486e27
Found better way of specifying region.
2014-04-25 04:13:59 +01:00
photonstorm
251bc10327
jshint fixes.
2014-04-25 02:52:14 +01:00
photonstorm
11ca2deaf6
Finally - fully working setHSL and shiftHSL.
2014-04-25 02:45:35 +01:00
photonstorm
6fb4ad06d7
Added in various new methods such as hslToRgb.
2014-04-25 02:45:35 +01:00
Richard Davey
a1e5c266a1
Merge pull request #757 from georgiee/pausable-pysics
...
[Enhancement] Pausable P2 World
2014-04-24 13:32:35 +01:00
Georgios Kaleadis
f41ac206dd
fix elapsed time bug
2014-04-24 12:49:12 +02:00
Georgios Kaleadis
33fc41a9b0
fix comment
2014-04-24 11:59:55 +02:00
Georgios Kaleadis
339da73160
pausable p2 world
2014-04-24 11:56:52 +02:00
photonstorm
387ff4f0fa
BitmapData.processPixelRGB lets you perform a custom callback on every pixel in the BitmapData.
2014-04-24 05:20:45 +01:00
photonstorm
c88fa2bd91
Loads of BitmapData updates. More details soon.
2014-04-24 03:49:49 +01:00
photonstorm
0f1e0a3d4e
Updated the Device little / big endianess check.
2014-04-23 23:35:36 +01:00
photonstorm
b6cc150a15
Game.scratch is a single handy BitmapData instance that can be used as a visual scratch-pad, for off-screen bitmap manipulation (and is used as such by BitmapData itself).
...
Updated TS defs.
2014-04-23 22:14:47 +01:00
photonstorm
87bcb6677d
Group.classType allows you to change the type of object that Group.create or createMultiple makes to your own custom class.
2014-04-23 21:49:58 +01:00
photonstorm
4ec5665148
Fixed #750 - Invalid typescript mapping for TileSprite.autoScroll function in TS defs.
...
Game checks if window.console exists before using it (should fix IE9 issues when dev tools are closed), however it is still used deeper in Pixi.
Body.loadData flagged as deprecated.
2014-04-22 23:31:07 +01:00
photonstorm
944e03ddb8
P2.Body.loadPolygon has been updated to correct center of mass issues (thanks @georgiee, fix #749 )
2014-04-22 22:33:25 +01:00
Georgios Kaleadis
c0189c02c1
fixed loadPolygon center of mass
2014-04-22 19:56:25 +02:00
photonstorm
e0f850bc21
jshint fix
2014-04-22 11:33:03 +01:00
photonstorm
06878407e8
RandomDataGenerator.integerInRange uses a new method of rounding the value to an integer to avoid distribution probability issues (thanks PhaserFan)
2014-04-22 11:01:15 +01:00
photonstorm
5aaac8fbd4
Lots of jsdocs updates in the State class to make it more clear what the various properties and methods do.
2014-04-22 02:52:58 +01:00
photonstorm
e4887c8177
If Tween.yoyo was true but repeat was 0 then it wouldn't yoyo. Now if yoyo is set, but not repeat, the repeat count gets set to 1 (thanks @hilts-vaughan, fix #744 )
2014-04-22 02:12:21 +01:00
photonstorm
6ace9e6031
Made jsdocs clear that Point.set/setTo 2nd parameter is optional ( fix #743 )
2014-04-22 02:02:56 +01:00
photonstorm
f3922002a1
Circle.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745 )
...
Point.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745 )
2014-04-22 01:52:24 +01:00
photonstorm
0b1fb5a637
Destroying an object with an input handler during its onDown event would throw Signals dispatch errors (thanks @jflowers45, fix #746 )
...
InputHandler._setHandCursor private var wasn't properly set, meaning the hand cursor could sometimes remain (during destroy sequence for example)
All Game Objects have a new property: destroyPhase (boolean) which is true if the object is in the process of being destroyed, otherwise false.
The PIXI.AbstractFilter is now included in the Phaser Pixi build by default, allowing for easier use of external Pixi Filters.
2014-04-22 01:43:22 +01:00
photonstorm
a582f21a02
Fixed jsdoc and started extractAlpha
2014-04-20 21:17:01 +01:00
photonstorm
f24622191d
Small jsdoc fix.
2014-04-20 10:47:09 +01:00
Richard Davey
bf10cfa58f
Added ghosting info to Keyboard docs.
2014-04-20 01:57:32 +01:00
Richard Davey
e033ec9e86
The Emitter no longer checks minParticleScale = maxParticleScale, allowing for fixed scale particles again
2014-04-20 01:57:32 +01:00
Opher Vishnia
22b62726ad
Fixed typo in world.setMaterial
...
The function contained a typo: bodies is an Array and so bodies.setMaterial is undefined
2014-04-19 19:39:50 +03:00
photonstorm
3e6a88fff6
Group.remove now checks the child to see if it's a member of the root Group before removing it, otherwise Pixi throws an Error.
2014-04-17 12:47:36 +01:00
Richard Davey
82e23d852d
Merge pull request #734 from georgiee/fix-animation-destroy
...
Phaser.Animation#destroy fixed null reference of game
2014-04-17 12:33:01 +01:00
photonstorm
713bd203ee
ArcadePhysics.collideSpriteVsGroup checks if Sprite has a body before carrying on, now safely skips sub-groups or other non-Sprite group children.
...
QuadTree.retrieve now checks to see if the given Sprite has a body before carrying on.
2014-04-17 12:31:14 +01:00
photonstorm
ce592d48bf
Group.destroy checks parent before removing (thanks @clark-stevenson, fix #733 )
2014-04-17 12:18:39 +01:00
Georgios Kaleadis
41095c2933
change order in destroy method, first clear references then null all values
2014-04-17 13:16:24 +02:00
photonstorm
7c9f079ce5
Group.setProperty will now check if the property exists before setting it, this applies to Group.setAll and anything else using setProperty internally.
2014-04-17 12:11:37 +01:00
photonstorm
b77c034f61
World.wrap will take a game object and if its x/y coordinates fall outside of the world bounds it will be repositioned on the opposite side, for a wrap-around effect.
2014-04-16 22:59:19 +01:00
photonstorm
089dfbb960
Group.resetCursor will reset the Group cursor back to the start of the group, or to the given index value.
2014-04-16 21:39:04 +01:00
photonstorm
6979103634
Fix for #732 (Timer.onComplete not firing).
...
jsdoc updates across Math and InputHandler.
2014-04-16 18:50:54 +01:00
Gary
1cf9ff9f2f
Fixed that the TimerEvent should flag as pendingDelete before calling the callback, because callback might trigger the reorder function
2014-04-16 05:46:03 +08:00
photonstorm
3b73c17997
ArcadePhysics.Body.phase is checked in postUpdate to prevent it from being called multiple times in a single frame.
2014-04-15 02:50:25 +01:00
Richard Davey
d9e5b4078d
Merge pull request #724 from jotson/dev
...
Math.atan2 calls are using arguments in the wrong order
2014-04-15 02:08:53 +01:00
John Watson
252032359d
Merge branch 'dev' of github.com:jotson/phaser into dev
2014-04-14 17:15:09 -07:00
John Watson
27bdbbafaa
Fixed Math.atan2 arguments in wrong order
...
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/atan2
2014-04-14 17:14:31 -07:00
photonstorm
563e581049
Tidied up jsdoc blocks.
2014-04-15 00:57:35 +01:00
photonstorm
eeff786eb2
StateManager.restart incorrectly skipped the first additional parameter after clearCache (thanks @mariusbrn, fix #722 )
2014-04-14 23:34:13 +01:00
photonstorm
25a93cf4af
AnimationManager.play will now call Animation.stop on the current animation before switching to the new one (thanks @nihakue, #713 )
2014-04-14 23:29:09 +01:00
photonstorm
5d0ea6453b
AnimationManager.destroy now iterates through child animations calling destroy on all of them, avoiding a memory leak (thanks stauzs)
...
Animation.destroy didn't correctly clear the onStart, onLoop and onComplete signals.
2014-04-14 22:53:05 +01:00
photonstorm
a7f6165e39
InputManager.resetLocked - If the Input Manager has been reset locked then all calls made to InputManager.reset, such as from a State change, are ignored.
...
Keyboard.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
Key.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
2014-04-14 21:53:08 +01:00
photonstorm
055cb8058d
Device.crosswalk detects if your game is running under Intels Crosswalk XDK.
2014-04-14 16:40:14 +01:00
photonstorm
e9cb345261
P2.World.convertTilemap now correctly checks the collides parameter of the tiles as it converts them.
2014-04-14 13:52:53 +01:00
photonstorm
f70e4d7d90
Fixed the use of the destroy parameter in Group.removeAll and related functions (thanks @AnderbergE, fix #717 )
2014-04-14 12:57:29 +01:00
photonstorm
f33ba5dcc7
Timer has removed all use of local temporary vars in the core update loop.
...
Timer.clearPendingEvents will purge any events marked for deletion, this is run automatically at the start of the update loop.
The main Timer loop could incorrectly remove TimeEvent if a new one was added specifically during an event callback (thanks @garyyeap, fix #710 )
2014-04-14 11:51:50 +01:00
jdowell
c9a67936d8
Added OnFileStart signal to loader
...
We've had a number of people in the channel ask for the ability to know when a file has started loading and to get the file names of said files.
Added the OnFileStart signal to do just that.
2014-04-11 13:17:26 -05:00
photonstorm
0d15350755
Preparing for 2.0.4 development.
2014-04-11 14:29:38 +01:00
photonstorm
eb23903174
Corrected initial particle scale.
2014-04-11 03:26:14 +01:00
photonstorm
a2b2d558a5
jsdoc and jshint fixes.
2014-04-11 03:02:19 +01:00
photonstorm
77f8e5eefc
P2 Fixtures Collection Class (@georgiee please test it works ok! #704 )
2014-04-11 00:43:30 +01:00
photonstorm
3a1c202e24
jsdoc fixes for SignalBindings.
2014-04-11 00:19:37 +01:00
Richard Davey
b7b1e7428a
Merge pull request #704 from georgiee/fixture-list
...
P2 Fixtures Collection Class
2014-04-11 00:19:05 +01:00
photonstorm
a01cc2e1ca
Objects with an InputHandler now deactivate it when the object is removed from a Group but not destroyed ( fix #672 )
...
Lots of jsdoc fixes in Body and World.
Removed un-used events from World (such as onImpact).
2014-04-11 00:06:22 +01:00
Georgios Kaleadis
13e5cacd71
added a p2 fixture collections helper class
2014-04-10 23:45:35 +02:00
Georgios Kaleadis
1213cae0a4
additionally save fixtures by key
2014-04-10 21:28:14 +02:00
photonstorm
289b5b2532
Removed un-used vars.
2014-04-10 17:25:35 +01:00
photonstorm
9ddcc5d0ea
p2.World.defaultRestitution has been deprecated and is now p2.World.restitution.
...
p2.World.defaultFriction has been deprecated and is now p2.World.friction.
p2.World now uses 4 bodies for the world boundaries, rather than 1 body with 4 shapes. This helps the broadphase massively.
p2.World bounds are now included in the callback events such as beginContact and impact events.
2014-04-10 17:11:16 +01:00
photonstorm
780fb48ab3
P2.World has a new contactMaterial property, which can be configured like a normal P2 Contact Material and is applied when two bodies hit that don't have defined materials.
2014-04-10 14:51:20 +01:00
photonstorm
8449f77152
Fixed World.restitution typo.
...
Updated World to use the new p2 defaultContactMaterial.
2014-04-10 14:41:50 +01:00
photonstorm
78aa24f04b
Emitter.setScale now allows you to scale the x and y axis of the particles independently.
2014-04-10 05:18:06 +01:00
photonstorm
8c434a83ab
Fixed issue with Particles not being updated by the Emitter and rebuilt the dist files.
2014-04-10 04:19:43 +01:00
photonstorm
8bb22551aa
Added jsdocs to Particle and Emitter. Fixed p2 UMD.
2014-04-10 01:48:55 +01:00
photonstorm
95b0532f59
Emitter.setScale has a new 'rate' parameter which allows particles to change in scale over time, using any Easing value or timescale.
...
Emitter.setAlpha has a new 'rate' parameter which allows particles to change alpha over time, using any Easing value or timescale.
Emitter.bringToTop and Emitter.sendToBack are booleans that let you optionally set the display order of the Particle when emitted.
2014-04-10 01:36:05 +01:00
photonstorm
ff7dd65496
jshint fixes.
2014-04-10 00:57:46 +01:00
photonstorm
770ced8ac1
Group.customSort allows you to sort the Group children based on your own sort function.
2014-04-10 00:56:53 +01:00
photonstorm
be52515ed4
PluginManager parent parameter removed as it's redundant. Also most core functions tidied up and jsdocs fixed.
2014-04-09 16:12:25 +01:00
photonstorm
50981fd729
Emitter now has minParticleAlpha and maxParticleAlpha values for setting a random alpha on emitted particles.
...
Emitter.particleAnchor allows you to control the anchor of emitted Particles. Defaults to 0.5 (same as before) but now under your control.
Emitter now emits Phaser.Particle objects instead of Phaser.Sprites, which can be extended as required.
Emitter has had various local properties removed that were already declared in Phaser.Group which it extends.
2014-04-09 14:29:23 +01:00
photonstorm
a5d3558f09
Updated Time docs for deltaCap.
2014-04-09 12:15:34 +01:00
photonstorm
b9cb2417b6
Group.removeBetween now properly iterates through the children.
2014-04-09 03:19:36 +01:00
photonstorm
01ccbd97c0
Key.enabled boolean allows you to toggle if a Key processes its update method or dispatches any events without deleting and re-creating it.
2014-04-09 02:29:41 +01:00
photonstorm
e764be430e
Emitter.minParticleScale and maxParticleScale wasn't resetting the Body size correctly.
2014-04-09 00:59:53 +01:00
photonstorm
8fc2a465cd
New Phaser package, small docs updates and preparing P2.World for new bounds code and v0.5.0 migration.
2014-04-08 03:31:13 +01:00
photonstorm
451f68be96
Updated p2 to 6abc900ff9
(which has probably broken stuff, but we'll test it tomorrow).
2014-04-08 03:30:45 +01:00
photonstorm
01eec6cef5
Keyboard.stop nulls the function references after removing the event listeners (thanks @bmceldowney, #691 )
2014-04-07 12:29:26 +01:00
photonstorm
bf32590cfe
Fixed a few jsdoc errors.
2014-04-07 12:29:26 +01:00
Richard Davey
0c9bcc2ef2
Merge pull request #680 from Raeven0/dev
...
correct Tilemap.hasTile(...) parameter typing
2014-04-07 12:29:19 +01:00
Richard Davey
eef7cc2d6d
Merge pull request #688 from jonthulu/cursorFix
...
Fixed bug in group.next when cursor is at the last child.
2014-04-03 21:22:43 +01:00
Jon White
0aca0962df
Fixed bug when group.remove is called when the cursor is on the last children index.
2014-04-03 10:42:55 -05:00
Jon White
ab3ae750e2
Fixed bug in group.next when cursor is at the last child.
2014-04-03 10:13:27 -05:00
Richard Davey
1311c830a8
Merge pull request #684 from jonthulu/groupMove
...
Fixed bug where move up and move down method in groups did not work.
2014-04-02 23:04:47 +01:00
Jon White
e24c8f63ea
Fixed bug where move up and move down method in groups did not work.
2014-04-02 15:39:20 -05:00
Raeven0
7fa9e4639e
correct Tilemap.hasTile(...) parameter typing
...
Member methods of Tilemap which take a layer parameter use getLayer on
that parameter to allow passing int, string, and TilemapLayer objects.
Tilemap.hasTile(...) should do so as well.
2014-04-01 20:26:16 -05:00
photonstorm
de17263472
jshint fix
2014-04-01 20:57:52 +01:00
photonstorm
4d06298e64
Fixed silly SoundManager bug :)
2014-04-01 19:51:48 +01:00
photonstorm
f4dc686028
New build files for testing.
2014-04-01 16:13:00 +01:00
photonstorm
38d722c1e5
Tilemap.removeTile(x, y, layer) lets you remove the tile at the given coordinates and updates the collision data.
...
Tilemap.removeTileWorldXY lets you remove the tile at the given pixel value coordinates and updates the collision data.
If you pass `null` to Tilemap.putTile as the tile parameter it will pass the call over to Tilemap.removeTile.
2014-04-01 13:36:42 +01:00
photonstorm
61429d8467
StateManager.restart allows you to quickly restart the *current* state, optionally clearing the world and cache.
2014-04-01 11:25:04 +01:00
photonstorm
a4ed94e039
Key.reset now clears any callbacks associated with the onDown and onUp events and nulls the onHoldCallback if set. Key.reset is called by Keyboard.reset when changing state.
2014-04-01 04:41:43 +01:00
photonstorm
439cefd481
ArcadePhysics.Body.hitTest(x, y) will return a boolean based on if the given world coordinate are within the Body or not.
...
Fixed jsdoc method tags in Body.
2014-04-01 03:54:20 +01:00
photonstorm
03b80887f2
SoundManager.removeByKey(key) will remove all sounds from the SoundManager that have a key matching the given value.
2014-04-01 03:42:30 +01:00
photonstorm
3728f25d68
SoundManager.remove(sound) now lets you remove a sound from the SoundManager, destroying it in the process.
...
Sound.destroy will remove a sound and all local references it holds, optionally removing itself from the SoundManager as well.
2014-04-01 03:38:13 +01:00
photonstorm
b6ad11701e
Various jshint fixes.
2014-04-01 01:30:20 +01:00
Richard Davey
e1529a3ffb
Merge pull request #662 from ralphsmith80/master
...
issue#661 update state before values are cleared
2014-04-01 00:56:35 +01:00
photonstorm
9762bff5eb
Updated docs to specify callback parameter order ( #667 )
2014-04-01 00:50:24 +01:00