Commit graph

1390 commits

Author SHA1 Message Date
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