photonstorm
0f3cda0aed
Cache.getRenderTexture will retrieve a RenderTexture that is stored in the Phaser Cache. This method replaces Cache.getTexture which is now deprecated.
...
Cache.autoResolveURL is a new boolean (default `false`) that automatically builds a cached map of all loaded assets vs. their absolute URLs, for use with Cache.getURL and Cache.checkURL. Note that in 2.1.3 and earlier this was enabled by default, but has since been moved behind this property which needs to be set to `true` *before* you load any assets to enable.
Cache._resolveUrl has been renamed to Cache._resolveURL internally and gained a new parameter. This method is a private internal one.
Cache.getUrl is deprecated. The same method is now available as Cache.getURL.
XML files weren't being added to the URL map.
Cache._resolveURL was causing a Sound double-load in Firefox and causing errors (thanks @domonyiv #1253 )
2014-10-27 11:46:24 +00:00
photonstorm
12c2f83bfc
Repackaging for 2.1.4 release.
2014-10-27 10:59:37 +00:00
Paul
9a16448021
API / documentation consistency updates
...
- The `disabled` property of various input classes has been inverted to `enabled`.
Direct/internal usage of `disabled` has been transformed to `!enabled`.
- A `disabled` get/set property has been added to wrap `enabled`, and marked as @deprecated
This ensures current API compatibility.
2014-10-26 17:25:03 -07:00
Paul
ce2acdd54c
TilemapLayer / Tileset
...
- Minor regression fix, increasing argument specifity/documentation
2014-10-25 22:17:31 -07:00
Paul
6108091035
Merge branch 'dev' of https://github.com/photonstorm/phaser into wip-tilelayer
2014-10-25 22:10:20 -07:00
Paul
22be4b0bf6
TilemapLayer / Tileset performance and documentation
...
TilemapLayer
- Added "delta scroll rendering"
- Enabled (by default) via `renderSettings.enableScrollDelta`
- Dramatic CPU reduction: 30% to 2% scrolling 50x37 region
- Side-effect: fixed some Chrome de-opt issues with `render`
- Various rendering updates and removal of many `_mc` field
- Made `index` a read-only propert that reflects the layer.index
- Creates a local cache from tile index -> tileset, added `resetTilesetCache`
- Also prevents crash when an index not associated with a tileset is
used; see `missingImageOverfill`.
- Various debug options moved to `debugSettings` and simplified; documentation updated.
- Uses `debugSettings.missingImageOverfill` and `tileColor` (deprecated) to display invalid tileset images
- Only change the context alpha when the tile alpha changes; in Chrome 38
this removed a .5% penalty
- Added `renderSettings` which controls misc. rendering/optimizations.
- Updated documentation to @member, clarified
Tileset
- Added `containsTileIndex` method to allow being queried if the specific tile index is handled/supported.
- Uses a firstgid bias and interlacing to fit the data in single densely packed array.
- Updated documentation to @member, clarified
2014-10-25 21:48:59 -07:00
Richard Davey
35c42e3073
Tilemaps in WebGL wouldn't update after the first frame due to a subtle change in how Pixi uploads new textures to the GPU.
2014-10-25 10:09:04 +01:00
photonstorm
f4f53984ef
Merge remote-tracking branch 'origin/master' into dev
2014-10-23 16:06:17 +01:00
photonstorm
d22f2bd89b
Small fix for Text wordWrapping #1247
2014-10-23 16:03:29 +01:00
photonstorm
18f6b320ab
Preparing for Phaser v2.2.0
2014-10-23 13:52:39 +01:00
photonstorm
f3f022b74a
Final Pixi v2 updates.
2014-10-23 12:32:56 +01:00
photonstorm
9cb42a933d
Fixed for Pixi v2 new method of batching.
2014-10-23 12:27:25 +01:00
photonstorm
0430cf8a6a
jsdoc fix
2014-10-23 12:27:07 +01:00
photonstorm
bebb83bad4
Removed methods that Pixi now offers directly.
2014-10-22 23:53:02 +01:00
photonstorm
e14c6efbc3
Updated to support new Pixi style of points.
2014-10-22 23:52:46 +01:00
photonstorm
b56c3bf54e
jshint fixes
2014-10-22 22:49:20 +01:00
photonstorm
1bc1d2eb94
Fixed Text class for Pixi v2 changes.
2014-10-22 22:35:21 +01:00
photonstorm
fbe68e330d
Phaser 2.1.3 build.
2014-10-22 21:42:12 +01:00
photonstorm
73f210257a
Removed duplicate Pixi classes and updated the build manifests to pull-in the correct Pixi Matrix class.
2014-10-22 21:20:38 +01:00
photonstorm
474fd8e055
JSDoc fixes.
2014-10-21 23:08:16 +01:00
photonstorm
54570a2b27
Small jsdoc fixes.
2014-10-21 22:48:06 +01:00
photonstorm
96fd0ade74
JSDoc fixes.
2014-10-21 22:43:42 +01:00
photonstorm
01a068f53c
Rectangle.scale allows you to scale the width and height of a Rectangle.
2014-10-21 00:25:54 +01:00
photonstorm
9d58297eb9
Button.setSounds now works if given an AudioSprite as the sound source.
2014-10-20 23:17:05 +01:00
photonstorm
1a357e18c8
Rectangle contains updates.
2014-10-20 14:28:09 +01:00
photonstorm
b580746cb8
Input.hitTest now accurately detects hits on the extreme edges of a display object (thanks InsaneHero)
2014-10-20 14:28:09 +01:00
Alvin
7f31cfba62
fixed type in the cached previous point in mouse uniform (filter)
2014-10-20 14:39:16 +02:00
photonstorm
b9d10f5b7f
Pixi v2 updates.
2014-10-20 01:26:12 +01:00
photonstorm
6b2dbed96b
Fixed Input.getLocalPosition.
...
Updated Input.hitTest so it supports Phaser.Graphics objects.
2014-10-20 01:25:58 +01:00
photonstorm
35d29170d0
Lots of small jsdoc fixes and DocGen updates.
2014-10-20 00:54:56 +01:00
photonstorm
d70406588c
Filter.update now caches the previous pointer position to avoid flooding the uniform. Also the mouse uniform is now a value between 0 and 1 depending on the position within the game view.
2014-10-17 19:29:50 +01:00
photonstorm
f0b7670506
Fixed an issue where audio files with query strings after them would fail the canPlayAudio
checks (thanks Vithar)
2014-10-17 18:50:12 +01:00
photonstorm
c960ab5d44
Typo fix.
2014-10-17 17:07:43 +01:00
photonstorm
f75c95144f
Pixi v2 update.
2014-10-17 16:55:15 +01:00
photonstorm
5e734a6bb6
Pixi v2 UV update fixes.
2014-10-17 16:52:47 +01:00
photonstorm
52f1663642
Fixed the Filter mouse uniform value population.
2014-10-17 16:52:28 +01:00
photonstorm
4f1ba99120
BitmapData.getFirstPixel will scan the BitmapData and return the color and location of the first non-transparent pixel encountered. You can specify one of 4 scan directions: top to bottom, bottom to top, left to right and right to left.
...
BitmapData.getBounds will return a `Rectangle` object that encompasses the full extent of the non-transparent pixels in the BitmapData. This can be useful if you wish to trim away transparent pixels from the sides of a BitmapData down to size before saving.
2014-10-17 16:51:50 +01:00
photonstorm
3965862b82
More pixi v2 updates.
2014-10-15 22:12:38 +01:00
photonstorm
fbfb107146
JSDoc fixes in the Rope class (thanks @Rovanion)
2014-10-15 22:05:38 +01:00
Richard Davey
837a035194
Merge pull request #1228 from Rovanion/dev
...
Corrected documentation for Phaser.Rope
2014-10-15 22:04:17 +01:00
photonstorm
2657de0daa
Sound.fadeTo allows you to fade the Sound to the given volume over the duration specified (thanks @nickryall #1225 )
2014-10-15 21:48:00 +01:00
Richard Davey
33ebc10570
Merge pull request #1225 from nickryall/dev
...
Phaser.Sound.fadeTo Method
2014-10-15 21:44:42 +01:00
Richard Davey
7a79a68050
Merge pull request #1230 from bobbywilson0/dev
...
Changed all typeof comparisons from == to ===
2014-10-15 21:39:07 +01:00
photonstorm
c0b752e0a6
Put the Timer.timeCap back to 1000 as this will be a major breaking change to existing code otherwise. It may be incorrect, but it can't happen in this point release.
2014-10-15 21:37:17 +01:00
photonstorm
9140163c85
Fixed a reference error to the Loader.baseURL in Cache._resolveUrl method (thanks @neurofuzzy #1235 )
2014-10-15 21:36:44 +01:00
photonstorm
967497c572
Added a few new uniforms and tidied things up.
2014-10-15 19:35:45 +01:00
Richard Davey
86cfc7111e
Fixed UV updates for WebGL textures.
2014-10-15 11:36:35 +01:00
photonstorm
3f43637782
Happily removed the IE11 WebGL lock as Pixi now fully supports it :)
2014-10-14 01:10:17 +01:00
photonstorm
d3c26f8c38
Removed old WebGL UV calls.
2014-10-14 01:10:09 +01:00
photonstorm
0501ca69ae
Merged latest Pixi dev build.
2014-10-13 23:54:22 +01:00
photonstorm
3997a7c372
Time.prevTime is a new property that contains the raw value of the game timer from the previous update.
...
Timer.timeCap has been changed from `1000` to `1 / 60 * 1000` to bring it in line with Time.timeCap.
2014-10-13 16:18:42 +01:00
photonstorm
5d84f38f6e
Device.canPlayAudio now supports the opus
files directly, as well as opus
encoded audio stored in ogg containers ( #1232 )
2014-10-13 13:52:41 +01:00
photonstorm
88a97b935b
Pixi v2 weekend updates.
2014-10-13 12:23:24 +01:00
photonstorm
d206dd0dad
Updates for Pixi v2
2014-10-13 12:20:25 +01:00
Bobby Wilson
42f53d6266
Merge commit '0482684dc864869397031994f7ba7d9f81721763' of https://github.com/bobbywilson0/phaser into dev
2014-10-10 22:01:34 -06:00
Bobby Wilson
0482684dc8
changed all typeof comparisons from == to ===
2014-10-10 21:52:06 -06:00
photonstorm
ac27f12c95
Fixes for Pixi update WebGL UV calls.
2014-10-11 04:18:42 +01:00
photonstorm
163a6c46f3
Updated to Pixi 2.0.0-dev.
2014-10-10 20:36:04 +01:00
photonstorm
0c5438038d
Allowed the orientation checks to still work when using RESIZE scale mode.
2014-10-10 20:35:50 +01:00
Rovanion Luckey
3ec5f2e0d3
Was able to figure out what the Array was made of through an example.
2014-10-10 17:16:53 +02:00
Rovanion Luckey
1cfbb31937
Figured out that it's supposed to be an array of some sort from the pixi source.
2014-10-10 17:16:53 +02:00
Rovanion Luckey
9023ec1609
Corrected the docs for Rope somewhat.
2014-10-10 17:16:53 +02:00
photonstorm
022d7094d5
jsdoc fixes and frameRate change.
2014-10-10 14:49:01 +01:00
nickryall
f5db1b070e
Phaser.Sound.fadeTo Method
2014-10-10 11:03:13 +13:00
photonstorm
bee0e73748
Preparing for 2.1.3 dev.
2014-10-09 16:32:31 +01:00
photonstorm
9f24c08216
Updated readme and docs.
2014-10-09 16:12:53 +01:00
photonstorm
506a091257
Sound.allowMultiple allows you to have multiple instances of a single Sound playing at once. This is only useful when running under Web Audio, and we recommend you implement a local pooling system to not flood the sound channels. But it allows for one Sound object to play overlapping times, useful for gun effects and similar ( #1220 )
2014-10-09 14:44:25 +01:00
Richard Davey
e6754b0a87
Merge pull request #1221 from englercj/url-cache-map
...
Add ability to get a cached resource by url
2014-10-09 14:10:54 +01:00
Richard Davey
bc16c7876f
Merge pull request #1187 from codevinsky/feature/group-filter
...
Group.filter
2014-10-09 14:08:51 +01:00
Richard Davey
9546fc2959
Merge pull request #1222 from englercj/camera-follow-fix
...
Fix camera follow when in a scaled parent
2014-10-09 14:07:40 +01:00
photonstorm
b00866cee9
AnimationManager.name will now return the name
property of the currently playing animation, if any.
2014-10-09 14:06:13 +01:00
photonstorm
08c6106c35
Fixed issue with textureLine creating white blocks in iOS.
2014-10-09 02:30:31 +01:00
photonstorm
f2aa263d0a
jsdoc fix
2014-10-06 07:00:00 +01:00
Chad Engler
c21c0d5515
add url properties to destroy
2014-10-05 08:18:52 -07:00
Richard Davey
e6812cffa6
Added BMD frame checks.
2014-10-05 12:35:40 +01:00
Richard Davey
5dbe6b6017
The Uint32Array check used in Utils was incorrectly replacing Uint32Array on Safari, causing errors like BitmapData.getPixel32 to fail and other related issues ( fixes #1043 and #1197 )
2014-10-05 12:35:40 +01:00
Richard Davey
498b564f05
Merge pull request #1217 from spayton/dev
...
Fixes issue #1212 (again), this time properly built and tested
2014-10-05 11:56:14 +01:00
Chad Engler
d9f477a086
add ability to get a cached resource by url
2014-10-04 20:48:21 -07:00
Chad Engler
4d2e60348f
fix camera follow when in a scaled parent
2014-10-04 20:14:46 -07:00
Victor Bjelkholm
81c0a53ef2
Add PLUS and MINUS to list of keyboard keys
2014-10-03 20:59:29 +02:00
photonstorm
ff034b5077
Fixed textureLine and added repeat parameter.
2014-10-03 03:57:49 +01:00
photonstorm
ab78710daa
BitmapData.textureLine takes a Phaser.Line object and an image in the image cache. It then accurately draws the image as a repeating texture for the full length of the line.
2014-10-03 02:21:09 +01:00
spayton
eeeb6c3733
This stops Phaser progressing with file loads when an audio file file
...
failed in IE.
The problem was that it was calling fileComplete everytime instead of
setting it as a callback.
2014-10-02 16:48:12 +01:00
photonstorm
173786c60d
Color.createColor now populates the color
property of the returned object with the results of Phaser.Color.getColor
.
...
Color.createColor now has a `color32` property with the results of `Phaser.Color.getColor32`.
Color.hexToColor has been optimised to inline the regex and has moved the createColor call so it now populates the color object fully, not just setting the r,g,b properties.
2014-10-01 16:51:34 +01:00
photonstorm
2794d94b08
Color.createColor now populates the color objects color
and color32
properties with the results of Phaser.Color.getColor
and getColor32
respectively.
2014-10-01 15:19:57 +01:00
photonstorm
f04c16da81
Bail out on undefined data.
2014-10-01 05:21:30 +01:00
photonstorm
d65c526184
Cache.addBitmapData has a new parameter: frameData
allowing you to pass a Phaser.FrameData
object along with the BitmapData.
...
Cache.getFrameData has a new parameter: `map` which allows you to specify which cache to get the FrameData from, i.e. `Phaser.Cache.IMAGE` or `Phaser.Cache.BITMAPDATA`.
Sprite.loadTexture if given a BitmapData as the texture will now query the cache to see if it has any associated FrameData, and if so it will load that into the AnimationManager.
2014-10-01 03:10:13 +01:00
photonstorm
26f9e05dca
BitmapData.shadow(color, blur, x, y) provides a quick way to set all the relevant shadow settings, which are then be used in future draw calls.
2014-09-30 22:50:08 +01:00
photonstorm
ef85b8415d
If you pass a tinted Sprite to BitmapData.draw
or BitmapData.copy
it will now draw the tinted version of the Sprite to the BitmapData and not the original texture.
2014-09-30 21:07:57 +01:00
photonstorm
e8ca670fba
Fixed the body debug calls for Box2D.
2014-09-30 01:44:44 +01:00
photonstorm
c195998a1e
Color.webToColor restored. Converts a CSS rgba color into a native color value.
2014-09-30 01:44:33 +01:00
photonstorm
ecfed2b311
AnimationParser is now using value
instead of nodeValue
when parsing atlas XML files, avoiding Chrome deprecation warnings (thanks @valtterip #1189 )
2014-09-29 22:52:09 +01:00
photonstorm
ccc4e42e03
A Timer with a delay value that was a float and not an integer would not loop correctly. Timer delay values are now passed through Math.round to avoid this (thanks @osmanzeki #1196 )
2014-09-29 22:15:41 +01:00
photonstorm
00b5472d4c
jshint fixes.
2014-09-29 12:29:18 +01:00
photonstorm
2ee50d0c29
InputHandler now uses localToGlobal conversion for scaled responsive layers.
2014-09-29 12:27:28 +01:00
photonstorm
b0e96a37b9
Added Box2D handler support.
2014-09-29 12:27:28 +01:00
DanX
3a1ec3c5c1
Fix docs for collide and collideHandler
2014-09-26 22:37:11 -03:00
photonstorm
319146292b
First pass at scale handling on drag. Enable with: sprite.input.scaleLayer = true;
2014-09-25 17:01:27 +01:00
photonstorm
415c7fe578
Added the sourceRect
and maskRect
parameters back into BitmapData.alphaMask
as they were accidentally removed in 2.1 (thanks seejay92)
2014-09-25 15:30:03 +01:00
photonstorm
7f196a01e7
Text.addColor allows you to set specific colors within the Text. It works by taking a color value, which is a typical HTML string such as #ff0000
or rgb(255,0,0)
and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was Photon Storm
and you did Text.addColor('#ffff00', 6)
it would color in the word Storm
in yellow.
...
Text.clearColors resets any previously set colors from `Text.addColor`.
2014-09-24 17:10:02 +01:00
photonstorm
d7f8e11d21
Removed the customBounds layer.
2014-09-24 06:52:22 +01:00
photonstorm
9e29a58d89
Sound.fadeOut(duration) will fade the Sound to a volume of zero over the duration given. At the end of the fade the Sound will be stopped and Sound.onFadeComplete dispatched.
...
Sound.fadeIn(duration, loop) will start the Sound playing, or restart it if already playing, set its volume to zero and then increase the volume over the duration given until it reaches 1. At the end of the fade the Sound.onFadeComplete event is dispatched.
2014-09-24 06:51:39 +01:00
photonstorm
dd74e3b0b4
Changing any of the Text properties such as font, lineSpacing and fontSize on a Text object that wasn't already on the display list would cause an updateTransform error. Parent is now checked first in all setters.
2014-09-24 01:10:36 +01:00
Richard Davey
473e9a1d88
jshint fix
2014-09-23 22:28:15 +01:00
Richard Davey
abe6f5ace2
Point.parse updated to allow either/or x/y setting and default values.
...
Point.parse will return a new Point object based on the x and y properties of the object given to Point.parse (thanks @codevinsky #1198 )
2014-09-23 22:23:01 +01:00
Richard Davey
d7d69947fb
Merge pull request #1198 from codevinsky/feature/point-parse
...
Phaser.Point.parse
2014-09-23 22:15:51 +01:00
Richard Davey
01fd3df434
AudioSprite support is now built into the Loader and SoundManager. AudioSprites are like sprite sheets, only they consist of a selection of audio files and markers in a json configuration. You can find more details at https://github.com/tonistiigi/audiosprite (thanks @codevinsky #1205 )
...
Fixed AudioSprite jsdoc, casing and formatting issues.
2014-09-23 22:15:09 +01:00
Jeremy Dowell
7cce1366f2
jshint cleanup
2014-09-23 10:25:49 -05:00
Jeremy Dowell
dd0d1729ad
Phaser.AudioSprite
...
AudioSprite implementation for phaser.
Loads audio sprites based on the file format created with: https://github.com/tonistiigi/audiosprite
2014-09-23 10:21:29 -05:00
Richard Davey
c6231ddd38
jsdoc fix
2014-09-22 11:32:26 +01:00
Richard Davey
eb72e4c581
Fixing jsdoc headers.
2014-09-21 10:28:04 +01:00
Richard Davey
49ddf46ef3
Merge pull request #1199 from codevinsky/feature/rectangle-aabb
...
Rectangle.aabb
2014-09-19 13:50:14 +01:00
photonstorm
5980a3bdc6
Loader can now natively load XML files via load.xml
. Once the XML file has loaded it is parsed via either DOMParser or ActiveXObject and then added to the Cache, where it can be retrieved via cache.getXML(key)
.
...
Cache now has support for XML files stored in their own container. You can add them with `cache.addXML` (typically this is done from the Loader automatically for you) and get them with `cache.getXML(key)`. There is also `cache.checkXMLKey(key)`, `cache.checkKeys` and `cache.removeXML(key)`.
2014-09-19 13:45:04 +01:00
Jeremy Dowell
ab9da10999
added: Rectangle.aabb
...
* Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.
*
* @method Phaser.Rectangle#aabb
* @param {Phaser.Point[]} points - The array of one or more points.
* @param {Phaser.Rectangle} [out] - Optional Rectangle to store the value in, if not supplied a new Rectangle object will be created.
* @return {Phaser.Rectangle} The new Rectangle object.
* @static
2014-09-18 15:16:33 -05:00
photonstorm
d18f523d93
jsdoc fixes.
2014-09-18 16:58:25 +01:00
photonstorm
597b828d7a
StateManager.boot would call start on a State twice if it was added to the game and started before the DOM load had completed. This didn't cause an error but was duplicating function calls needlessly.
2014-09-18 05:14:44 +01:00
photonstorm
426b43cc9f
Removed console.log calls.
2014-09-18 05:12:35 +01:00
photonstorm
d68ed61999
If you called StateManager.start from within a states init
method which also had a preload
method it would fail to start the next State.
2014-09-18 05:11:58 +01:00
photonstorm
756561920f
Group.ignoreDestroy boolean will bail out early from any call to Group.destroy
. Handy if you need to create a global Group that persists across States.
2014-09-18 05:11:48 +01:00
Jeremy Dowell
29dd09fdf6
added: Phaser.Point.parse
...
static method that will take an object of any kind and return a new point based on the x & y properties of that object.
optional x & y property names can also be supplied
2014-09-17 14:23:28 -05:00
photonstorm
e5eea56c9b
jsdoc updates.
2014-09-16 19:44:04 +01:00
photonstorm
20551f9129
Lots of jsdocs fixes ready for the new doc generator.
2014-09-16 17:35:08 +01:00
Richard Davey
cf363a56f1
Cache.removeImage has a new parameter: removeFromPixi
which is true
by default. It will remove the image from the Pixi BaseTextureCache as well as from the Phaser Cache. Set to false if you don't want the Pixi cache touched.
2014-09-16 12:20:03 +01:00
Richard Davey
15a0ae6b4f
jsdoc fix
2014-09-16 00:28:09 +01:00
photonstorm
57295d7ac8
jsdoc fixes.
2014-09-15 13:51:17 +01:00
photonstorm
fc6b7dd36c
StateManager.unlink will null all State-level Phaser properties, such as game
, add
, etc. Useful if you never need to return to the State again.
2014-09-15 13:19:01 +01:00
photonstorm
60acef2f97
If Game Objects change their frame, such as with an animated Sprite, and the change goes from a previously trimmed frame to a non-trimmed (full size) one, then the previous trim values were still left active, causing it to glitch (thanks stupot)
2014-09-11 20:56:01 +01:00
Jeremy Dowell
83007878fc
updated: Group.filter documentation
2014-09-11 13:09:52 -05:00
Jeremy Dowell
298622f65f
added: Group.filter
...
takes a predicate function and passes child, index, and the entire child array to it.
return an ArrayList containing all children that the predicate returns true for.
2014-09-11 13:06:38 -05:00
photonstorm
e5cac96302
Preparing for 2.1.2
2014-09-11 12:02:20 +01:00
photonstorm
5b922be56e
Version 2.1.1. of Phaser is an emergency point release. It addresses a potential race condition that could happen in States that tried to change state from the create
method but had an empty preloader or pre-cached assets.
2014-09-11 10:38:40 +01:00
Federico Omoto
0bdb0bdde5
Unnecessary "if" in Line.fromSprite method
2014-09-09 17:24:36 -03:00
Federico Omoto
471c2f444b
Documentation fixes
2014-09-09 16:22:59 -03:00
photonstorm
b801630d78
Preparing for 2.1.1 development.
2014-09-09 16:50:23 +01:00
photonstorm
33d9b19e29
The Debug canvas is now cleared on State swap.
2014-09-09 15:28:58 +01:00
photonstorm
1f089d74c5
Phaser.Easing.Default is a new property that is used when a specific type of ease isn't given. It defaults to Linear.None but can be overridden to anything (thanks @alvinsight)
2014-09-09 14:01:49 +01:00
photonstorm
5eedc4c2c5
The physics config object is now stored locally in World.config.
2014-09-09 12:49:31 +01:00
photonstorm
3fc527ba53
Added Math.numberArray back in and renamed the replacement to Math.numberArrayStep to avoid breaking the API.
2014-09-09 12:49:17 +01:00
photonstorm
5e6c40e392
Fixed the jsdocs and crop method used on preloader sprites.
2014-09-09 12:48:38 +01:00
photonstorm
a1c9b64327
Now bails out of a few methods if RESIZE is set.
2014-09-09 12:48:21 +01:00
photonstorm
2e9dc682a1
Tidied up a redundant if
call.
2014-09-09 12:47:59 +01:00
photonstorm
b4e7da78ed
jsdocs updated.
2014-09-09 12:47:39 +01:00
photonstorm
c40c140631
Camera.roundPx is a new boolean. If set to true
it will call view.floor
as part of its update loop, keeping its boundary to integer values. Set to false
to disable this from happening ( #1141 )
2014-09-09 12:47:27 +01:00
photonstorm
79d873f47b
If you are using CocoonJS, please set your game render type to CANVAS and not WEBGL or AUTO. You should also disable any of the ScaleManager screen resizing or margin setting code. By default in this mode CocoonJS will now set 'screencanvas=true' which helps with performance significantly.
2014-09-08 22:34:53 +01:00
photonstorm
09915ebfde
Tidying up debug.
2014-09-08 22:34:53 +01:00
photonstorm
052e5042ed
jsdoc fix.
2014-09-08 22:34:53 +01:00
photonstorm
59f7c53019
P2.Body.addCapsule didn't use to pass the radius value through pxm, but now does so you have to specify it in pixels, not meters.
2014-09-08 22:34:53 +01:00
Richard Davey
3102ad534d
Swapped the order of the Camera.view floor to avoid the 1px jitter effect on the right of maps.
2014-09-06 10:26:54 +01:00
Richard Davey
d72117ab8d
Merge pull request #1170 from codevinsky/feature/utils
...
Phaser.Utils.range: easily create an array that contains a range of numbers.
2014-09-05 17:59:32 +01:00
photonstorm
7c02358eed
More FlexGrid updates.
2014-09-05 16:19:32 +01:00
photonstorm
22df587bd3
Swapped to using FlexLayers.
2014-09-05 15:46:21 +01:00
photonstorm
ff07317120
First version of the FlexLayer class.
2014-09-05 15:46:10 +01:00
photonstorm
4903e47a98
Rectangle.topRight returns a Point object that represents the top-right coordinate of the Rectangle.
2014-09-05 15:45:47 +01:00
Jeremy Dowell
06c6b23454
moved: Utils.range to Math.numberArray
2014-09-05 09:36:36 -05:00
photonstorm
72c0f50b6b
Lots of small enhancements and layer types.
2014-09-05 08:02:44 +01:00
photonstorm
0af4ec4da2
The StateManager will now check if a State has a method called resize
. If it does, and if the game is running in the RESIZE Scale Mode then this method will be called whenever the game resizes. It will be passed two parameters: width
and height
that will match the games new dimensions. Resizing can happen as a result of either the parent container changing shape, or the browser window resizing.
2014-09-05 06:22:10 +01:00
photonstorm
0c9eef8a91
FlexGrid added to the ScaleManager.
2014-09-05 06:02:25 +01:00
photonstorm
07f529bf12
First experimental build of FlexGrid.
2014-09-05 06:01:48 +01:00
photonstorm
f2a8a927f9
Group.addMultiple allows you to pass an array of game objects and they'll all be added to the Group in turn.
2014-09-05 06:01:25 +01:00
photonstorm
cb14fd1c01
Rectangle.centerOn(x,y) allows you to quickly center a Rectangle on the given coordinates.
2014-09-05 04:13:21 +01:00
Jeremy Dowell
1835453880
fixed: jshint errors
2014-09-04 19:31:53 -05:00
Jeremy Dowell
6c3fac5665
added: Phaser.Utils.range
2014-09-04 19:28:46 -05:00
photonstorm
ac9c9a1f9b
Fixed the assignment of the fullScreenTarget so FS mode works again now.
2014-09-05 01:07:51 +01:00
photonstorm
67f14713af
Removed Gestures stuff as it was all commented-out anyway.
2014-09-05 01:07:16 +01:00
photonstorm
4d14119a57
Removed console.log.
2014-09-05 00:14:22 +01:00
photonstorm
d5ffe1f971
Phaser.Mouse will now add a listener to the window
to detect mouseup
events. This is used to detect if the player releases the mouse while outside of the game canvas. Previously Pointer objects incorrectly thought they were still pressed when you returned the mouse over the canvas ( #1167 )
2014-09-04 23:29:43 +01:00
Richard Davey
7ee1564f2e
Signal.removeAll would ignore the context parameter and remove all bindings regardless (thanks @alect #1168 )
2014-09-04 22:24:47 +01:00
Richard Davey
55400ce988
World.createDistanceConstraint signature changed to include new local anchors (thanks @rhmoller #1169 )
2014-09-04 22:22:10 +01:00
photonstorm
9fa3f8f2b1
alphaMask update.
2014-09-04 16:53:19 +01:00
photonstorm
3a69ed944d
Fixed TypeScript defs for BitmapData.
2014-09-04 16:52:10 +01:00
photonstorm
9aaa8d80ca
jsdocs, fixes to load, draw, copy and addToWorld.
2014-09-04 05:05:30 +01:00
photonstorm
cbc6ac8e7d
New debug header.
2014-09-04 05:05:05 +01:00
photonstorm
cd7e4abecf
Add jsdocs.
2014-09-04 05:04:54 +01:00
photonstorm
7d9a4f4100
Phaser.Text wouldn't render the text to its local canvas if you passed the text on the constructor and didn't add it to the display list. If a string is given it now updates the local canvas on creation.
2014-09-04 02:18:12 +01:00
Richard Davey
168ce82fe8
Rectangle.bottom setter swapped the order of the calculation (thanks @JakeCoxon #1165 )
2014-09-03 22:42:24 +01:00
Richard Davey
fe0c03d5d7
Phaser.Text.destroy will now destroy the base texture by default ( #1162 )
2014-09-03 22:34:10 +01:00
Richard Davey
68368357ba
jshint fix
2014-09-03 22:26:05 +01:00
Richard Davey
42f19f4978
Phaser.Canvas.setImageRenderingCrisp now sets image-rendering: pixelated, perfect for pixel art and which is now supported in Chrome 38.
2014-09-03 22:16:03 +01:00
photonstorm
804eea9ca3
Optimised BitmapData.copy and refactoring continues.
2014-09-03 20:56:31 +01:00
photonstorm
15e6edc56b
BitmapData.copy no longer creates any temporary variables. It also accurately copies over Sprite/Image values before drawing them.
...
Creation now defaults to a texture size of 256x256.
2014-09-03 12:53:07 +01:00
photonstorm
f5ad22399f
BitmapData.copy is now the new uber copy function. Helper methods coming.
2014-09-03 11:12:06 +01:00
photonstorm
1f84024a3e
Cache.getImage now returns null if no image was found.
2014-09-03 11:11:48 +01:00
photonstorm
3b28d568e9
Ironed out the issues in BitmapData.fastCopy.
2014-09-03 01:28:58 +01:00
Richard Davey
773be312ce
BitmapData.fastCopy test.
2014-09-02 23:16:10 +01:00
photonstorm
de07f5b649
Testing out Frame and Animation clone features.
2014-09-02 21:03:16 +01:00
photonstorm
8bc5ba8d7d
Tween.generateData would skip the end values in the data array. They are now included as the object in the final array element.
2014-09-02 15:45:52 +01:00
photonstorm
865c6878bf
P2.World.getSprings used to return an empty array, but now returns all the Springs in the world ( #1134 )
2014-09-02 15:06:43 +01:00
photonstorm
d26f937f1c
RetroFont has a new property called frameData which contains the Frame objects for each of the letters in the font, which can be used by Sprites.
2014-09-02 00:41:53 +01:00
Richard Davey
895ab12262
Merge pull request #1158 from ctmartinez1992/dev
...
Added support to pass 2 array in Arcade collide and overlap
2014-09-01 21:31:33 +01:00
photonstorm
8f7141ca3f
New blit op
2014-09-01 20:22:47 +01:00
Carlos Martinez
ec9a8b6903
Firxed for travis build.
2014-09-01 15:03:29 +01:00
Carlos Martinez
94f9c0906f
this fixes the camera judders when following with float values.
2014-09-01 14:49:44 +01:00
Carlos Martinez
9843818f30
Merge branch 'dev' of https://github.com/photonstorm/phaser into dev
2014-09-01 14:19:50 +01:00
Carlos Martinez
0640cc0c03
Added support to pass 2 array in Arcade collide and overlap (response to an issue).
2014-09-01 14:01:36 +01:00
photonstorm
2cc8e57808
Fixed issue with the ScaleManager.
2014-09-01 08:19:43 +01:00
photonstorm
070e33f1e7
ArcadePhysics.overlap has been updated so that the Body.overlapX/Y properties are set to the amount the two bodies overlapped by. Previously they were zero and only populated during the separation phase, but now the data is available for just overlap checks as well. You can then use these values in your ovrelap callback as required - note that they are changed for every check, so a Sprite overlap tested against 10 other sprites will have the overlapX/Y values updated 10 times in a single collision pass, so you can only safely use the values in the callback ( #641 )
2014-09-01 03:54:55 +01:00
photonstorm
7fc37751b2
ScaleManager.orientationSprite has been removed because it never displayed correctly anyway (it would be distorted by the game scale), it will be bought back in a future version by way of a custom orientation state.
2014-09-01 03:30:02 +01:00
photonstorm
047839d806
Fixed preUpdate so that the offset is reset regardless of the RESIZE scaleMode.
2014-09-01 03:20:09 +01:00
photonstorm
8fec5169f0
Added Sound._muteVolume which stops Firefox and IE9 crashing if you try to unmute a sound that hasn't yet been muted, which can also happen as a result of a game visibility change (thanks @osmanzeki #1108 #1123 )
2014-09-01 03:13:05 +01:00
photonstorm
80d1df4705
ScaleManager.setMinMax(minWidth, minHeight, maxWidth, maxHeight) is a handy function to allow you to set all the min/max dimensions in one call.
2014-09-01 03:07:17 +01:00
photonstorm
2f1f680d73
Docs fixes.
2014-09-01 02:59:24 +01:00
photonstorm
c6493b59c3
Removed use of _startHeight, left over from the Phaser v1 days that's no longer required.
2014-09-01 02:44:35 +01:00
photonstorm
fe9dbd15e5
The World bounds can now be set to any size, including smaller than the game dimensions. Before it was locked to a minimum size of the game canvas, but it can now be anything.
2014-09-01 02:41:07 +01:00
photonstorm
1a60d641b1
Canvas.removeFromDOM(canvas) will remove a canvas element from the DOM.
...
Game.destroy now removes the games canvas element from the DOM.
2014-09-01 02:38:21 +01:00
photonstorm
97d771c4e8
ScaleManager has a new scaleMode called RESIZE
which will tell Phaser to track the size of the parent container (either a dom element or the browser window if none given) and set the canvas size to match it. If the parent changes size the canvas will resize as well, keeping a 1:1 pixel ratio. There is also a new ScaleManager.setResizeCallback method which will let you define your own function to handle resize events from the game, such as re-positioning sprites for a fluid responsive layout ( #642 )
...
The width and height given to the Phaser.Game constructor can now be numbers or strings in which case the value is treated as a percentage. For example a value of "100%" for the width and height will tell Phaser to size the game to match the parent container dimensions exactly (or the browser window if no parent is given). Equally a size of "50%" would tell it to be half the size of the parent. The values are retained even through resize events, allowing it to maintain a percentage size based on the parent even as it updates.
2014-09-01 01:52:04 +01:00
photonstorm
5fb8c7eb85
ScaleManager window.resize handler would constantly dispatch enterPortrait and enterLandscape events on window resizing, regardless if it actually entered that orientation or not.
...
Stage.offset has been moved to ScaleManager.offset
Stage.bounds has been removed, you can access it via Stage.getBounds.
Stage.checkOffsetInterval has been moved to ScaleManager.trackParentInterval
ScaleManager.hasResized signal has been removed. Use ScaleManager.setResizeCallback instead.
2014-09-01 01:02:48 +01:00
Richard Davey
b08bfec372
Fixed Key jsdocs #1157
2014-08-31 19:05:31 +01:00
photonstorm
004deff508
Note: This commit will break all input, don't pull it down until I finish this work off later today please!
...
Moved the DOM offset from Stage to ScaleManager (a more logical location for it) and updated Pointer to use that.
Moved the Pointer offset check to look at the ScaleManager.
Used getBoundingClientRect(), will see if that works better than Phaser.Canvas.getOffset.
2014-08-31 12:17:07 +01:00
photonstorm
8c7a699f74
Getting ready to test auto resizing renderer.
2014-08-31 11:09:27 +01:00
photonstorm
4d0cae0e2d
jshint fixes for CocoonJS.App and continuing work on the new ScaleManager.
2014-08-31 10:17:02 +01:00
photonstorm
3e1eb10673
First pass at fully resizable canvas tracking and parenting.
2014-08-31 10:17:02 +01:00
Richard Davey
258e9d2646
Merge pull request #1152 from videlais/patch-5
...
CocoonJSApp 'onSuspended' and 'onActivated' events
2014-08-31 00:12:11 +01:00
Richard Davey
bc71d61734
Merge pull request #1151 from videlais/patch-4
...
CocoonJS doesn't support mouse wheel
2014-08-31 00:09:07 +01:00
Dan Cox
cccaa30459
CocoonJSApp 'onSuspended' and 'onActivated' events
...
This PR depends on [#1150 ] (https://github.com/photonstorm/phaser/pull/1150 )!
(I apologize for all the different pull requests in a short time period. I finally got some time to do some development tonight and have been making my way through many of my TODO items.)
This adds support for CocoonJS.App's 'onSuspended' and 'onActivated' events, making it so that the timers and sounds are stopped/started and muted/unmuted when the user swaps an app from the background to the fore or the reverse.
Because neither ['onActivated'] (http://doc.ludei.com/2.0.2/CocoonJS_App/symbols/CocoonJS.App.html#.event:onActivated ) nor ['onSuspended'] (http://doc.ludei.com/2.0.2/CocoonJS_App/symbols/CocoonJS.App.html#.event:onSuspended ) send an Event object themselves, this patch fakes sending an object by creating one during the function call and giving it a 'type' property for visibilityChange() to check against.
2014-08-29 23:13:13 -04:00
Dan Cox
46c8fe3a09
CocoonJS doesn't support mouse wheel
...
CocoonJS hasn't implemented the "DOMMouseScroll" and "mousewheel" events.
2014-08-29 22:45:52 -04:00
Dan Cox
3f7f6fac2c
Adjustment for JSLint
2014-08-29 22:33:33 -04:00
Dan Cox
c1872356fe
Detect CocoonJS.App
...
There's a bit of a story behind this, but I'll try to keep it short.
While I've been working on a patch to detect Cordova's 'pause' and 'resume' events for Phaser.Stage's checkVisibilityChange(), I came across this [thread] (http://www.html5gamedevs.com/topic/8834-cocoonjs-pause-game-on-app-switch/ ) over on the forum. My hope, at the time, was that someone else would come along and write this patch and I could use their work to finish my own code. But, since that hasn't happened yet (and might never), I'm sending in this PR first for the check that establishes a 'game.device.cocoonJSApp' boolean that I plan to use later.
2014-08-29 20:58:19 -04:00
photonstorm
410cfd2d71
Code reformatting.
2014-08-29 18:06:01 +01:00
photonstorm
92386221e4
Tile.setCollision now adjusts the tiles interesting faces list as well, this allows you to create one-way jump tiles without using custom callbacks on a specific tile basis (thanks @RafaelOliveira #886 )
2014-08-29 18:03:32 +01:00
photonstorm
5546e5903c
Tiled polylines are now imported into the map objects property as well as map collision ( #1117 )
2014-08-29 16:56:30 +01:00
photonstorm
0284d0b98c
If Time.elapsed was > Time.timeCap it would reset the elapsed value to be 1 / 60. It's now set to Time.timeCap and Time.timeCap defaults to 1 / 60 * 1000
as it's a ms value (thanks @casensiom #899 )
2014-08-29 16:37:57 +01:00
photonstorm
10e7d8ff7e
TilemapParser.getEmptyData now correct adds an empty bodies array into layers. This fixes an issue where p2 couldn't convert a csv map into collision tiles (thanks @sru #845 )
2014-08-29 16:30:29 +01:00
photonstorm
719b81c6e3
GamepadButton.justPressed and justReleased now correctly report if the button has just been pressed or released (thanks @padpadpad #1019 )
2014-08-29 16:08:38 +01:00
photonstorm
9047e4d5ca
Sorted out the issue with Images not working properly with texture atlases.
2014-08-29 15:55:23 +01:00
photonstorm
7b9c1a561e
GamePad and SinglePad onAxisCallback parameters have changed. You are now sent: this (a reference to the SinglePad that caused the callback), the axis index and the axis value in that order.
...
GamePad axis detection now works again properly in Firefox (#1035 )
2014-08-29 15:55:05 +01:00
photonstorm
32119e9892
Animation.onUpdate is a new event that is dispatched each time the animation frame changes. Due to its intensive nature it is disabled by default. Enable it with Animation.enableUpdate = true
( #902 )
2014-08-29 14:30:44 +01:00
photonstorm
9055fc7e01
The Pointer move callbacks are now sent an extra parameter: fromClick
allowing your callbacks to distinguish between the Pointer just moving, or moving as a result of being pressed down (thanks @iforce2d #1055 )
2014-08-29 14:19:47 +01:00
photonstorm
9b6ffc3f94
Moved Springs to not extend p2 Springs as they break when added to the p2.World. Springs and spring removal now working properly ( #1134 )
2014-08-29 14:13:20 +01:00
photonstorm
26a55bd202
SoundManager.destroy is a new method that will destroy all current sounds and reset any callbacks.
...
StateManager.clearCurrentState now handles the process of clearing down the current state and is now called if the Game is destroyed.
Game.destroy now clears the current state, activating its shutdown callback if it had one. It also now destroys the SoundManager, stopping any currently running sounds (#1092 )
2014-08-29 11:37:47 +01:00
photonstorm
69b9e5eb7c
Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo #877 #1147 )
2014-08-29 01:28:43 +01:00
Richard Davey
32989094f4
Merge pull request #1147 from pyromanfo/dev
...
Fix for group vs group within group collision (fixes #877 )
2014-08-29 01:27:01 +01:00
Allen Cook
5a3eeb8a9c
Fix for group vs group within group collision ( fixes #877 )
2014-08-28 20:23:02 -04:00
photonstorm
dd160f004b
jsdocs update for collideWorldBounds #1010
2014-08-29 01:16:05 +01:00
photonstorm
52ea95d9ce
Sound.restart used to cause the Sound to double-up if it was already playing when called. Now correctly stops the sound before restarting it (thanks @wombatbuddy #1136 )
2014-08-29 01:06:29 +01:00
photonstorm
dd9e7e6297
Pointer.dirty is a new boolean that is set by the InputHandler. It tells the Pointer to re-check all interactive objects it may be over on the next update, regardless if it has moved position or not. This helps solve issues where you may have a Button that on click generates a pop-up window that now obscures the Button (thanks @jflowers45 #882 )
2014-08-29 00:47:49 +01:00
photonstorm
b4ba7958c6
Added missing copy parameter to Image.crop, fixing jshint in the process.
2014-08-28 23:26:27 +01:00
photonstorm
cca955f1fd
Updated to latest version of Pixi.
2014-08-28 23:11:13 +01:00
Richard Davey
ffb413b741
Fixed issue with callbacks not having the correct context.
2014-08-28 21:54:30 +01:00
photonstorm
e3f73b87ba
Fixed some jsdocs issues and added the Image.alive property.
2014-08-28 17:04:59 +01:00
photonstorm
05922d6fb0
Lots of fixes to the Image class to restore texture loading and fix cropping so it works exactly the same as the Sprite now.
2014-08-28 17:04:59 +01:00
photonstorm
6fbaa36ddd
P2.PointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
...
P2.InversePointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
P2.PointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
P2.InversePointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
2014-08-28 17:04:58 +01:00
photonstorm
34426e7560
Loader.useXDomainRequest boolean automatically set to true
if the browser is specifically detected as IE9, but you can still override this. IE10 will use xhr.
2014-08-28 05:24:57 +01:00
Richard Davey
3a9f869882
Merge pull request #1129 from videlais/patch-2
...
Device detection of Node-Webkit
2014-08-28 04:37:58 +01:00
photonstorm
2d4d1a050d
Tilemap.hasTile now checks the Tile.index value and will return false if the index is -1 (i.e. a non-active tile) (thanks @elgansayer #859 )
2014-08-28 04:30:13 +01:00
photonstorm
a7d9b2c8c5
The P2.World.postBroadphaseHandler now checks if the returned pairs array is empty or not before processing it (thanks @wayfu #934 )
2014-08-28 04:24:08 +01:00
photonstorm
0c88ba041a
If you used a single Game configuration object and didn't specify the enableDebug property it would crash on Debug.preUpdate (thanks @luizbills #1053 )
2014-08-28 04:19:10 +01:00
photonstorm
83619ba81e
InputHandler docs updated to avoid Pointer data-type confusion ( #1097 )
2014-08-28 04:07:24 +01:00
photonstorm
6216cf578c
BitmapFonts are now correctly added to the Cache._bitmapFont array and returned via Cache.getBitmapFont (thanks @prudolfs #1076 )
2014-08-28 03:52:26 +01:00
photonstorm
0f207c47a7
Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077 )
2014-08-28 03:44:02 +01:00
photonstorm
ec687868de
Input.setMoveCallback has been removed due to deprecation.
...
BitmapData.refreshBuffer has been removed and replaced with BitmapData.update.
BitmapData.drawSprite has been removed due to deprecation. Use BitmapData.draw instead.
Pointer.moveCallback has been removed due to deprecation.
SinglePad.addButton has been removed due to deprecation.
P2.Body.loadData has been removed due to deprecation.
P2.World.defaultFriction and defaultRestitution have been removed due to deprecation.
Canvas.create noCocoon parameter has been removed due to deprecation.
Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
2014-08-28 03:40:59 +01:00
photonstorm
6e2cd37776
ScaleManager.destroy now removes the window and document event listeners, which are no longer created anonymously (thanks @eguneys #1092 )
...
Input.Gamepad.destroy now destroys all connected SinglePads and clears event listeners.
SinglePad.destroy now clears all associated GamepadButton objects and signals.
2014-08-28 03:31:47 +01:00
Dan Cox
a0840274f7
Tests for both Node and Node-Webkit
2014-08-27 22:00:14 -04:00
photonstorm
fa45d7feff
Events.onDestroy is a new signal that is dispatched whenever the parent is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
...
Group.onDestroy is a new signal that is dispatched whenever the Group is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
2014-08-28 02:56:06 +01:00
photonstorm
6b4510f693
TileSprite now has the alive
property, which should help with some Group operations (thanks @jonkelling #1085 )
2014-08-28 02:36:30 +01:00
photonstorm
d7f8950758
Debug.cameraInfo no longer crashes if the camera bounds are nulled (thanks @wayfu #1143 )
...
Camera.setBoundsToWorld no longer crashes if the camera bounds are nulled (thanks @wayfu #1143 )
2014-08-28 02:13:51 +01:00
Richard Davey
50179d76fb
Merge pull request #1015 from Zielak/dev
...
Phaser.Camera.position for quick access
2014-08-28 02:02:40 +01:00
Richard Davey
ee579c2b0d
Merge pull request #989 from lucbloom/android-stock-browser
...
Android stock browser check
2014-08-28 02:01:25 +01:00
Richard Davey
9941942941
Merge pull request #1030 from codevinsky/rope
...
Phaser.Rope
2014-08-28 01:56:02 +01:00
Richard Davey
7fe4abc5c4
Merge pull request #1059 from lucbloom/spritesheet-to-framecount
...
Sprite Sheet => frame count
2014-08-28 01:49:15 +01:00
Richard Davey
6a314a60d1
Merge pull request #1142 from darfux/dev
...
Fixed Group.removeBetween's default endIndex bug
2014-08-28 01:44:01 +01:00
Richard Davey
e8ca3a8d7b
Merge pull request #1130 from beeglebug/feature/clone-consistency
...
Improved consistency of clone methods on geometry classes
2014-08-28 01:40:51 +01:00
Richard Davey
cc69a4bf2c
Merge pull request #1127 from FedeOmoto/dev
...
Game configuration object "renderer" property wrongly assigned to Game.r...
2014-08-28 01:36:49 +01:00
Richard Davey
afb094a6eb
Merge pull request #1126 from beeglebug/feature/tile-properties
...
copy tile properties to tiles when parsing map
2014-08-28 01:35:20 +01:00
Richard Davey
cc1c7948f3
Merge pull request #1125 from beeglebug/fix/#1095-rectangle-contains-rect
...
swapped argument order of Rectangle.containsRect - fixes #1095
2014-08-28 01:33:33 +01:00
Richard Davey
ec6259558e
Merge pull request #1111 from rex64/dev
...
Added support for Tiled object's type field
2014-08-28 01:31:22 +01:00
photonstorm
ccc8369f43
InputHandler.checkBoundsRect was incorrectly assigning a property in Sprites fixed to the camera being dragged left (thanks @CraigBeswetherick #1093 )
2014-08-28 01:29:23 +01:00
photonstorm
7bfa6fa9f2
Loader.useXDomainRequest boolean added. If true
(the default is false
) it will use XDomainRequest when loading JSON files instead of xhr. In rare IE edge-cases this may be required. You'll know if you need it ( #1131 #1116 )
2014-08-28 01:23:45 +01:00
photonstorm
c87aa5103d
Fixed the RevoluteConstraint worldPivot and moved it to the end of the signature to minimise code changes.
2014-08-28 01:14:59 +01:00
photonstorm
aeb82dbee9
World.createRotationalSpring will now let you create rotational springs.
2014-08-28 00:58:50 +01:00
photonstorm
6acc8bf9f2
World.enableBodySleeping has been removed and replaced with World.sleepMode.
2014-08-28 00:45:57 +01:00
photonstorm
98ccae56de
P2.Body now uses the new Body.type value instead of Body.motionState, however as P2.Body already have a property called type
we have left the motionState
getter/setter in for now.
2014-08-28 00:39:47 +01:00
photonstorm
4935a4e4af
RevoluteConstraint fixed for new version of p2.
2014-08-28 00:24:56 +01:00
photonstorm
b25bdf3523
Fixed the DistanceConstraint parameters.
2014-08-28 00:15:28 +01:00
photonstorm
504b69ffaa
Updated p2.js to d1c7a340c42e4d5d1d939fba5fd13c5e49d6abd2
...
Updated grunt replace task to match p2s new UMD signature.
2014-08-28 00:01:35 +01:00
photonstorm
33c52eaf09
BitmapData alpha option added.
...
Pointer return type added.
pixi manifest updated to remove need for geom classes.
2014-08-27 21:26:29 +01:00
darfux
abdf54858c
Fixed Group.removeBetween's default endIndex bug
2014-08-26 21:02:13 +08:00
Stuart Lee
8ef5c5e0de
fixed arguments
2014-08-22 16:33:42 +01:00
Alvin
c7e256245a
Merge pull request #1107 from gamedolphin/test
...
Fixed Point.rotate bug . Also added a little documentation for world wrap.
2014-08-22 12:32:06 +02:00
Dan Cox
2065c3a77a
Fixed trailing whitespace
2014-08-21 20:37:27 -04:00
beeglebug
bfd0b77fd4
typo
2014-08-21 22:50:09 +01:00
beeglebug
c85f4c04b0
may as well use the setter logic, saves duplicating code
2014-08-21 22:46:44 +01:00
beeglebug
2faab9b516
added clone and setTo functions
2014-08-21 22:45:10 +01:00
beeglebug
7ae5657113
extra null check on output to match rectangle
2014-08-21 22:44:40 +01:00
Dan Cox
fa0fa860c0
Device detection of Node-Webkit
...
Because the user-agent string can be (easily changed) [https://github.com/rogerwang/node-webkit/wiki/Manifest-format#user-agent ], one of the few ways to detect Node-Webkit is to look for the 'process' object and require() function. If they exist, Node support was enabled and 'process.version' will have the version of Node.js used to create the project.
However, if Node is (disabled) [https://github.com/rogerwang/node-webkit/wiki/Manifest-format#nodejs ], the 'process' object won't exist and the project will be executed as if it was in a single instance of a browser anyway.
2014-08-21 17:37:51 -04:00
beeglebug
5930a90546
added clone function to Line
2014-08-21 22:36:40 +01:00
beeglebug
8c0a400d65
rename out to output to match others
2014-08-21 22:36:24 +01:00
Federico Omoto
14028cafbc
Game configuration object "renderer" property wrongly assigned to Game.renderer
2014-08-21 17:57:07 -03:00
beeglebug
23f077a4e8
copy tile properties to tiles when parsing map
2014-08-21 21:08:05 +01:00
beeglebug
a435191fd0
swapped argument order of Rectangle.containsRect - fixes #1095
2014-08-21 20:59:08 +01:00
Dan Cox
fbd2de5b23
Cordova 'deviceready' event check
...
A slightly obnoxious but necessary hack to prevent a race condition between the loading of Apache Cordova and Phaser itself.
Without waiting for the 'deviceready' event, Phaser can often load first, preventing any console messages from appearing to the user. Because Cordova writes to the platform's console (via CordovaLog), it must first be loaded and signal its own 'deviceready' event before console or plugin usage can occur. Otherwise, all messages and functionality is ignored.
2014-08-21 00:11:41 -04:00
Alessandro Cuzzocrea
5e76eb4834
Added support for Tiled object's type field
2014-08-16 21:44:21 +02:00
Sandeep Nambiar
b25e2bd782
Sign Error
2014-08-13 05:49:39 +05:30
Sandeep Nambiar
daade10ecc
Should fix the Error in rotation
2014-08-13 05:19:21 +05:30
Sandeep Nambiar
9977d5e204
World Wrap and P2
...
Changes only to documentation for clarity.
2014-08-13 04:10:37 +05:30
Dan Cox
d54725212f
Device detection of Apache Cordova
...
Simple check if "window.cordova" is defined for device detection of Phaser running (most likely) under Apache Cordova.
2014-08-11 12:33:06 -04:00
Alvin
6da5831f73
Merge pull request #1099 from kay-is/master
...
Method documentation was missing parameters.
2014-08-08 09:56:39 +02:00
Kay Plößer
9ac06c44ba
Method documentation was missing parameters.
2014-08-07 14:47:54 +02:00
Richard Davey
15378e1d09
Merge pull request #1091 from photonstorm/alvin/dev
...
Fixed #1078 chromeOS no belongs to desktops
2014-08-06 16:12:33 +01:00
Alvin
79166bb268
Fixed #1078 chromeOS no belongs to desktops
2014-08-06 14:08:38 +02:00
Sam MacPherson
3b69c7ede1
group swap fix
2014-08-05 19:39:21 -04:00
photonstorm
36ecd81f29
Arcade Physics Body.skipQuadTree is a new boolean that if set to true
when you collide the Sprite against a Group it will tell Phaser to skip using a QuadTree for that collision. This is handy if this Body is especially large.
...
Arcade Physics World.skipQuadTree will disable the use of all QuadTrees in collision methods, which can help performance in tightly packed scenes.
2014-08-04 13:04:11 +01:00
Richard Davey
0c4c43be1e
Merge pull request #1080 from lucbloom/detect-kindle
...
Added a UA string test for Kindle
2014-08-03 11:00:40 +01:00
photonstorm
aabdf6f97a
Resolves issue with pixel perfect click / over detection on Sprites that used trimmed image atlases for animations or frames > 0.
2014-08-01 17:46:51 +01:00
Luc Bloom
84cf835e83
Added a UA string test for Kindle
...
Also added PS Vita so the “silk” detection doesn’t confuse that one.
2014-07-31 15:40:59 +02:00
Richard Davey
48869776f2
Merge pull request #1064 from txusinho/dev
...
Fix for scale issues in CocoonJS using webgl renderer and screencanvas
2014-07-31 14:00:31 +01:00
Richard Davey
acceb692c3
Merge pull request #1071 from Dumtard/dev
...
Fix for previous PR #1028
2014-07-31 13:48:15 +01:00
photonstorm
9bbc8ecce3
Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060 )
2014-07-31 13:39:26 +01:00
Charles Black
a90ab2e59b
P2 bounds now collides with everything by default
2014-07-27 16:06:55 -04:00
Txus Ordorika
b952884d9d
Fix for scale issues in CocoonJS using webgl renderer and screencanvas
2014-07-23 17:16:25 +02:00
Luc Bloom
0fc30e839e
Removed some more checks
2014-07-22 10:42:47 +02:00
Luc Bloom
7f3b542fdd
Removed the notion of Sprite Sheets vs single frame images
...
Instead of making a distinction between single frame images and Sprite
Sheets, I added a simple FrameData with one Frame to every image that
gets loaded. This way, a lot of the engine code can be simplified.
For instance, you can play animations on any Sprite without having to
check the “frame count” of its image anymore.
The engine doesn’t have to check for non-existing .frameData anymore.
An animation can keep on playing when an image happens to be set with 1
frame, continuing its animation when after that, another image is set
with multiple frames.
Think of it this way: an image with one frame is an animation of just
one frame.
2014-07-22 10:24:53 +02:00
photonstorm
122640e01b
Phaser.Loader was incorrectly getting the responseText from _xhr instead of _ajax on IE9 xDomainRequests (thanks @lardratboy #1050 )
2014-07-21 11:12:58 +01:00
jackrugile
05d856d4ea
remove escaping backslashes from retro font text set documentation
2014-07-20 15:15:02 -06:00
photonstorm
8e7e6f05e1
Adding .0 :)
2014-07-18 13:12:08 +01:00
photonstorm
113b69a5d1
Preparing for 2.1 development work.
2014-07-18 13:09:21 +01:00
photonstorm
ee49575714
Preparing for master.
2014-07-18 12:35:16 +01:00
Richard Davey
d8c755a544
Merge pull request #1017 from devinb83/dev-codepaused
...
codePaused should be set if manually called
2014-07-18 11:57:37 +01:00
photonstorm
24527eac3e
Group.checkAll allows you to check if the same property exists across all children of the Group and is set to the given value (thanks @codevinsky #1013 )
...
Group.checkProperty allows you to check if the property exists on the given child of the Group and is set to the value specified (thanks @codevinsky #1013 )
Phaser.Utils.setProperty will set an Objects property regardless of depth (thanks @codevinsky #1013 )
Phaser.Utils.setProperty will set an Objects property regardless of depth (thanks @codevinsky #1013 )
Phaser.Utils.getProperty will get an Objects property regardless of depth (thanks @codevinsky #1013 )
2014-07-18 11:52:39 +01:00
Richard Davey
3da788bd1d
Merge pull request #1013 from codevinsky/group-checkall
...
added: Phaser.Utils.getProperty / Phaser.Utils.setProperty; added: Phase...
2014-07-18 11:37:38 +01:00
Richard Davey
491d7c2eec
Merge pull request #1036 from DarkDev-/dev
...
OritentationSprite fix, not using PIXI.TextureCache anymore
2014-07-18 11:32:50 +01:00
photonstorm
f9a6d1f376
Updating to Pixi 1.6.1
2014-07-18 11:22:55 +01:00
photonstorm
883c11e377
BitmapData.resize fixed to update the crop property too, resolves issues with images getting cut off with BitmapData.load.
2014-07-18 03:33:17 +01:00
photonstorm
9c1f39d284
jshint fix
2014-07-18 01:07:45 +01:00
photonstorm
49bb45c42e
Tilemap.swap now accurately swaps from A to B and from B to A (thanks @noidexe #1034 )
2014-07-18 00:29:24 +01:00
Richard Davey
91eb2ff842
Merge pull request #1033 from lucbloom/updateFrameData-fix
...
Frame data guards
2014-07-18 00:16:17 +01:00
Charles Black
31cc247462
AnimationManager.currentFrame update on play
2014-07-16 23:05:27 -04:00
photonstorm
82ef6d4aeb
If you add a Tween to the TweenManager and then immediately stop it, it will still exist in the TweenManager (thanks @gilangcp #1032 )
2014-07-16 19:50:58 +01:00
Johan Rosén
ba62326ce7
OritentationSprite fix, not using PIXI.TextureCache anymore
2014-07-16 17:07:53 +02:00
Luc Bloom
ccd4b502d7
Fram data guards
...
Sometimes, this._frameData is null. Guard agains it.
Sometimes, we transfer to an animation that contains lesser frames.
Guard against it.
2014-07-16 12:00:30 +02:00
photonstorm
f6935c01f8
Sprite.loadTexture will store the smoothed
property of the Sprite and re-apply it once the new texture is loaded.
2014-07-16 00:56:26 +01:00
photonstorm
90eec97707
Animation.updateFrameData allows you to load a new FrameData object into an existing animation, even if currently running (based on #1029 )
...
AnimationManager.loadFrameData will now update all existing Animations to use the newly loaded FrameData (based on #1029 )
2014-07-16 00:55:12 +01:00
photonstorm
aaf82f9d3a
Sprite.loadTexture has a new optional stopAnimation
boolean parameter which will halt the currently running animation (if any) after changing the texture (based on #1029 ).
2014-07-16 00:29:43 +01:00
photonstorm
d72e199291
Physics.bounds now correctly matches World.bounds on system start (thanks @Dumtard #1028 )
2014-07-16 00:14:47 +01:00
photonstorm
afeeeecbe0
Keyboard.processKeyPress now checks if the Keyboard Input handler is disabled or not before processing the key callbacks.
2014-07-16 00:12:59 +01:00
photonstorm
d10dea27b0
Pixi updated worldTransform from an Array to an Object and Phaser Image, BitmapText, Text and Graphics were still using array access to populate the world property, giving it incorrect results (thanks @alvinsight)
2014-07-15 22:44:02 +01:00
jdowell
f969c15aea
fixed: replaced 'snake' with key
2014-07-15 14:24:47 -05:00
jdowell
6432817c7f
added: Rope debug, segments, updateAnimation
2014-07-15 14:01:15 -05:00
jdowell
5a35e1a61d
Initial Rope Commit
2014-07-15 11:40:40 -05:00
Darek Zieliński
64ae6c6ba7
"Reuse a single Point object rather than creating a new one each time"
2014-07-15 18:32:20 +02:00
Richard Davey
afb379f2dd
Merge pull request #1024 from lucbloom/if-onShutDownCallback
...
Add a check around this optional function
2014-07-15 16:21:35 +01:00
Richard Davey
615d1b6526
Merge pull request #1026 from lucbloom/spritesheet-report-key
...
Report key when failing
2014-07-15 16:13:39 +01:00
Luc Bloom
7498e6aa6e
Report key when failing
...
While loading sprite sheet.
2014-07-15 16:47:49 +02:00
Richard Davey
053f862b6b
Merge pull request #1023 from lucbloom/sprite-textureChange-obsolete
...
Removed obsolete code in setTexture
2014-07-15 15:14:36 +01:00
photonstorm
538425193a
World.wrap when using the bounds of the object wouldn't adjust the bounds correctly, meaning wrapping outside the camera failed (thanks @jackrugile #1020 )
2014-07-15 14:22:24 +01:00
Richard Davey
f77b4d4e8f
Merge pull request #1014 from Dumtard/dev
...
Group create was not creating with p2 debug flag
2014-07-15 12:39:53 +01:00
Luc Bloom
5328069329
Removed obsolete code in setTexture
...
This code has no side-effects besides assigning “textureChange”, which
is used nor reset anywhere else.
2014-07-15 13:28:31 +02:00
Luc Bloom
f1cb146c10
Add a check around an optional function
...
My game crashes here if I update phaser.js to a new version. It happens
when my game switches to another State object.
2014-07-15 13:02:44 +02:00
photonstorm
64000dfcb6
Fixed small boolean check error.
2014-07-15 11:49:05 +01:00
photonstorm
f78a527ad5
Prevented objects with pixel perfect checks from over-riding other higher priority ID items ( #983 )
...
Rebuilt the way items are polled for Pointer events (drag, click, move). Now faster and more efficient, especially when some items in the stack require pixel perfect checks.
2014-07-15 11:20:57 +01:00
devinb83
4a632ed3a0
codePaused should be set if manually called
...
If pause is called manually, codePaused should be set regardless of whether the game is currently paused or not. This would fix issues where a developer might not want the game to automatically resume when the screen regains focus.
2014-07-14 12:57:37 -07:00
devinb83
2be45e93ae
QuadTree leveling Bug
...
Rather than level++ which changes the current node's level, the subnodes should get the current node's level + 1
2014-07-14 12:55:26 -07:00
Darek Zieliński
852054b772
Plus validation of non-point objects
2014-07-14 20:09:22 +02:00
Charles Black
7107d73188
group create with p2 debug
2014-07-14 14:05:44 -04:00
Darek Zieliński
ee1df55d84
Added position Point object for quick x/y coordinates access.
2014-07-14 20:03:34 +02:00
jdowell
aad74ff4d5
added: Phaser.Utils.getProperty / Phaser.Utils.setProperty; added: Phaser.Group.checkAll
...
Added deep-property getting and setting via strings:
Phaser.Util.getProperty(someObj, 'foo.bar.baz');
Phaser.Util.setProperty(someObj, 'foo.bar.baz', 'lol');
Added a "checkAll" method to Phaser.Group that returns true/false if all of the children's given properties match the value passed in.
this.someGroup.checkAll('foo.bar.baz', 'lol'); // will return true if child[n].foo.bar.baz === 'lol'
Comes with standard 'force' ability.
2014-07-14 12:33:13 -05:00
Charles Black
6363b35e26
docs typo
2014-07-14 11:01:21 -04:00
photonstorm
e5078a2197
Fixed missing cacheKey parameter.
2014-07-14 12:56:05 +01:00
photonstorm
f0365835c9
Pixi 1.6.1
2014-07-14 12:56:05 +01:00
photonstorm
2c421d27ce
GameObjectFactory.spriteBatch now lets you specify null
as a parameter for the parent and automatically adds the batch to game.world
as a result. Also fixed jsdocs issues (@petarov #1000 )
2014-07-14 12:56:05 +01:00
Richard Davey
92815d8965
Merge pull request #1007 from mjeffery/dev
...
Added missing onPackComplete Signal
2014-07-14 12:17:53 +01:00
mjeffery
fcc23ef5d2
fixed onPackComplete Signal
2014-07-13 15:38:13 -04:00
Petar Petrov
78771d875b
Fix issue #883
...
Check if points is an Array before parsing arguments.
2014-07-12 22:50:48 +02:00
photonstorm
22462566b4
Restored old Image object.
2014-07-11 18:02:40 +01:00
photonstorm
79c5544869
Pixi 1.6 patches for RenderTextures and IE9 Float32 calls.
2014-07-11 18:02:24 +01:00
photonstorm
0353ee12be
Reverting to a 2.0.7 release to fix the issues with Image / RetroText / Buttons.
2014-07-11 16:30:25 +01:00
photonstorm
26fb6cb866
Temporary fix for #997
2014-07-11 16:04:15 +01:00
photonstorm
ded5eac8c7
Updated build files with patched Pixi UMD statement.
2014-07-11 11:53:44 +01:00
photonstorm
74679922d1
Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, #995 )
2014-07-11 11:52:48 +01:00
Jeroen Verfallie
01a761b77f
Fixed pixel perfect dragging, this was still using the old property 'pixelPerfect' instead of the new 'pixelPerfectClick'
2014-07-11 09:58:38 +02:00
photonstorm
d7bed24a27
Preparing for 2.1.0 build.
2014-07-10 23:14:29 +01:00
photonstorm
46eb906253
Pixi 1.6 merge.
2014-07-10 20:39:13 +01:00
Richard Davey
435fab5205
Merge pull request #990 from lucbloom/warn-texture-not-found
...
Warn about missing textures and show the key that the author was trying to use.
2014-07-10 19:16:07 +01:00
photonstorm
0d0a16ee2c
loadTexture fix.
2014-07-10 19:13:17 +01:00
photonstorm
a3cf246aee
Image.loadTexture fix and new dist files.
2014-07-10 19:03:17 +01:00
Luc Bloom
3f5bde89fc
Warn about missing textures
...
And show the key that the author was trying to use. It can be very
helpful for debugging which image a sprite was trying to load exactly.
2014-07-10 18:49:16 +02:00
Luc Bloom
4183237fb3
Android stock browser check
...
This is a class-static function of Phaser.Device to check wether we’re
running on an Android Stock browser. Autors might want to scale down on
effects and switch to the CANVAS rendering method on those devices.
Usage: var defaultRenderingMode = Phaser.Device.isAndroidStockBrowser()
? Phaser.CANVAS : Phaser.AUTO;
2014-07-10 18:00:29 +02:00
photonstorm
a7124cb44c
Swapped back to camera.screenView as that's the correct check for inCamera.
2014-07-10 16:38:15 +01:00
photonstorm
0966971427
jshint fixes and tidying up for release
2014-07-10 16:21:50 +01:00
photonstorm
25e7e6ffc4
Pretty huge refactoring to cut down on duplicated code.
2014-07-10 16:07:02 +01:00
photonstorm
34efa223cb
Small conditional check in case someone has removed the animations property.
2014-07-10 16:06:47 +01:00
photonstorm
6a0b8b5e73
Fixed and working Sprite.crop - removed lots of _cache vars no longer required and added two new private vars.
2014-07-10 14:47:12 +01:00
photonstorm
78759260de
Updated Pixi.Sprite
2014-07-10 14:46:48 +01:00
photonstorm
006d40f452
Updated docs for loadFrameData and removed debug line.
2014-07-10 14:46:28 +01:00
photonstorm
4a429c3c1f
Added null
check to Rectangle.clone and size.
2014-07-10 14:46:09 +01:00
photonstorm
813de7c125
More crop work.
2014-07-10 10:46:19 +01:00
photonstorm
d11d8051b1
You can now prevent the Debug class from being created or booted by using the Game configuration setting: enableDebug
. By default it is true
, set to false
to prevent the class from being created. Please note you are responsible for checking if this class exists before calling it, but you can do that via if (game.debug) { ... }
(request #984 )
2014-07-10 10:46:18 +01:00
photonstorm
a182598c65
Using a Game configuration object you can now specify the value of the preserveDrawingBuffer
flag for the WebGL renderer. By default this is disabled for performance reasons. But if you need to be able to take screen shots of your WebGL games using toDataUrl on the game canvas then you'll need to set this to true
( #987 )
2014-07-10 10:46:18 +01:00
photonstorm
73e8a9763b
Pixi updates
2014-07-10 10:46:18 +01:00
jackrugile
42df8356e7
Added options to disable horizontal and vertical world wrapping individually
2014-07-10 00:05:50 -06:00
photonstorm
63fb7780b3
Fixes issue of Pixi DisplayObject width/height sending an emitter scale into Infinity.
2014-07-09 11:37:22 +01:00
photonstorm
0ff2eb2fb9
jshint fixes
2014-07-09 11:36:45 +01:00
photonstorm
494c33a9f4
Rectangle.randomX will return a random value located within the horizontal bounds of the Rectangle.
...
Rectangle.randomY will return a random value located within the vertical bounds of the Rectangle.
2014-07-09 11:34:18 +01:00
photonstorm
003403c832
Color.getWebRGB will now accept either an Object or numeric color value.
2014-07-09 11:15:24 +01:00
photonstorm
2293b64c94
Removing debug / console.log output.
2014-07-09 05:49:13 +01:00
photonstorm
ffd51479e4
Crop test
2014-07-09 05:43:15 +01:00
photonstorm
4fc26e4a26
Updated to the latest version of Pixi.
2014-07-09 05:40:50 +01:00
photonstorm
dd88f2a6e2
Fixed BitmapText parser.
2014-07-09 05:39:49 +01:00
photonstorm
a70a938505
docs fix
2014-07-09 05:38:59 +01:00
photonstorm
3ff8b9f999
On-going crop tests.
2014-07-08 12:59:36 +01:00
photonstorm
f1bcd1d00b
Added Phaser.Utils.mixin.
2014-07-08 12:59:36 +01:00
photonstorm
0b2bea3564
Removed hasOwnProperty check from Tween.from because it breaks on extended or inherited Game Objects.
2014-07-08 12:59:36 +01:00
photonstorm
2a106473b4
Added more detail to the Tween docs.
2014-07-08 12:59:36 +01:00
photonstorm
2d676b00b4
Working through crop issues.
2014-07-08 12:59:36 +01:00
photonstorm
77d5be1d8e
When adding a new Animation to a Sprite it would incorrectly reset the current Sprite frame to the first frame of the animation sequence, it is now left un-touched until you call play
on the animation.
2014-07-08 12:59:35 +01:00
Alvin
7031d9ccc1
Fixed typo
2014-07-07 18:19:02 +02:00
Alvin
f6f70d35a4
Added game.add.plugin, a shotcut for game.plugins.add
2014-07-07 18:18:00 +02:00
Richard Davey
6ce183189f
Merge pull request #971 from psalaets/issue-970
...
reorder param list of Phaser.Physics.Arcade.Body.render
2014-07-07 10:29:51 +01:00
Richard Davey
e9886ad84d
Merge pull request #972 from psalaets/debug-rendering-ninja-aabb-and-circle
...
Debug rendering for Ninja aabb and circle
2014-07-07 10:26:37 +01:00
b-ely
e02a52b55d
Adding a return to the Tween#from method
2014-07-06 18:21:03 -05:00
Paul Salaets
cbf0a9011a
remove a little duplication
2014-07-05 21:53:32 -04:00
Paul Salaets
0c15ef6adc
move shape specific debug rendering into the shapes
2014-07-05 21:29:28 -04:00
Paul Salaets
77b86f43e3
support for debug rendering ninja AABB and circle bodies
2014-07-05 20:58:33 -04:00
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