Commit graph

3086 commits

Author SHA1 Message Date
Richard Davey
74fd042749 If the Mouse was over a Sprite and you then clicked it, it would dispatch another Over event. This is now surpressed if the Over event has already been dispatched previously (thanks @McFarts #2133)
InputHandler.pointerOver could fail to return anything in some instances, now always returns a boolean.
2016-02-17 02:07:07 +00:00
Richard Davey
83a35e41d6 ctrl + click is now only considered a right-click if event.buttons = 1, this should allow you to use ctrl as a key modifier on Windows (and any device with a multi-button mouse attached) and still use ctrl + click on OS X / trackpads for a right-click (thanks @yuvalsv #2167) 2016-02-17 01:46:55 +00:00
Richard Davey
1932515f56 Fixed a really nasty bug in Chrome OS X where a ctrl + click (i.e. simulated right-click) on a trackpad would lock up the Pointer leftButton, causing future clicks to fail. This is now handled by way of a mouseout listener on the window object, sadly the only way to force a mouseup in Chrome (thanks @KyleU #2286) 2016-02-17 01:26:35 +00:00
photonstorm
4426c712ff jshint fix. 2016-02-12 17:29:30 +00:00
photonstorm
6ad22bc098 Phaser 2.4.5-RC2 with fresh docs and build files. 2016-02-12 16:00:36 +00:00
photonstorm
59ff0b0a57 Docs fix. 2016-02-12 14:49:37 +00:00
Richard Davey
989d53ecba Undo #1993 2016-02-09 14:01:04 +00:00
Richard Davey
92479eb03f * Device.safariVersion now holds the major version of the Safari browser.
* Device.edge is a boolean that is set if running under the Microsoft Edge browser.
* Device.dolby is a boolean that is set if the browser can play EC-3 Dolby Digital Plus files
* The Loader and SoundManager can now play Dolby Digital Plus files on supported devices.
2016-02-09 13:17:14 +00:00
Richard Davey
332fb6fe68 Fixed window global check. 2016-02-09 11:41:24 +00:00
Richard Davey
30b563085b The z property assigned to children of a Group now starts from zero instead of 1, this is an internal change mostly but if you relied on the z property for some reason then please be aware of this (thanks pantoninho) 2016-02-09 11:31:46 +00:00
Richard Davey
eff10cec71 Moved the width / height floor into the ScaleManager (#2329) 2016-02-08 23:09:16 +00:00
Taylan Kasap
1310daa9af Added RandomDataGenerator.sign (returns -1 or +1) 2016-02-07 14:25:19 +02:00
Chad Engler
5b7130d4d6 fix one more place where resolution wasn't taken into account 2016-02-06 17:05:44 -08:00
Chad Engler
7457cc67f2 Fix #2320: properly size filter texture and viewport 2016-02-06 11:30:31 -08:00
Richard Davey
5801f1aa15 jshint fixes. 2016-02-04 23:39:58 +00:00
Richard Davey
818c64291a SinglePad.onDownCallback has been moved to the end of the method, so that DeviceButton.start is now called before the callback fires, meaning if you check the status of the button in the onDownCallback it will now be fully activated (thanks @suicidepills #2159) 2016-02-04 22:46:18 +00:00
photonstorm
829b1e7ad1 Events.onDragUpdate has a new 6th property fromStart which is a boolean. You can determine if the event was the result of the start of a drag movement or not by polling it (#2155) 2016-02-04 17:00:30 +00:00
photonstorm
882c8b8d40 InputHandler.consumePointerEvent has been removed, as it was never used internally anyway, so was misleading (thanks @GregoryAveryWeir #2227) 2016-02-04 16:46:35 +00:00
Richard Davey
1ac287f9d3 Merge pull request #1993 from nickryall/retina-fullscreen
Fix for fullscreen retina ( Desktop )
2016-02-04 18:31:50 +02:00
photonstorm
9787474c6e Camera.checkBounds now takes the scale of the Camera into account (thanks @ForGorNorPor #2263) 2016-02-04 16:26:18 +00:00
photonstorm
a7c360425f Tidying up code and docs. 2016-02-04 16:23:40 +00:00
Richard Davey
a8b04c4bf1 Merge pull request #2171 from mattrick16/dev
Add method to angle Display Objects relative to world
2016-02-04 18:21:14 +02:00
Richard Davey
2a948832fc Merge pull request #1842 from hightopo/fix-mask-filter-bug
Fix mask combine filter bug
2016-02-04 18:07:39 +02:00
photonstorm
af4c938299 Docs update (#1967) 2016-02-04 16:05:45 +00:00
photonstorm
5bcfa08af6 Text.useAdvancedWrap allows you to swap between the Basic and the Advanced word wrapping functions. In Advanced it will wrap long-words and condense and trim excess white space (thanks @soldoutactivist #1811) 2016-02-04 16:00:21 +00:00
photonstorm
da8fa83730 Changed default back. 2016-02-04 16:00:16 +00:00
photonstorm
afc96352de PIXI.WebGLGraphics.stencilBufferLimit is a new integer that allows you to define how many points exist in a Graphics object before Pixi swaps to using the Stencil Buffer to render it. The default is now 64 (originally 6). This fixes issues with things like Quadratic curves not rendering as masks in WebGL. 2016-02-04 14:52:35 +00:00
photonstorm
c3c2dd6067 Graphics.arc has a new argument segments that allows you to control how many segments are created when the arc is drawn. The default is 40. Use a higher number for more fidelity, i.e. if you find that reversed arcs are not joining up fully (#2064) 2016-02-04 13:49:55 +00:00
photonstorm
8076f64656 We have replaced the PolyK Triangulation calls within Pixi with EarCut 2.0.8. This allows for faster polygon triangulation, and also deals with more complex polygons that PolyK would crash on. 2016-02-04 13:23:01 +00:00
Rafael Barbosa Lopes
a267e81b26 Doc: Loader.enableParallel is Boolean. 2016-02-04 10:06:12 -02:00
Richard Davey
2cd76b7617 Docs update (#2166) 2016-02-04 00:13:32 +00:00
Richard Davey
33604901c4 TilingSprite would ignore the renderable property, and render it regardless. Now it skips render if renderable is false (thanks @Green92 #2214) 2016-02-04 00:09:30 +00:00
Richard Davey
4e7fad353e Loader.audiosprite is renamed to Loader.audioSprite (the old one still works for legacy reasons) (thanks @epaezrubio #2145) 2016-02-03 23:53:50 +00:00
Richard Davey
ecb68c2fca JSDocs update. 2016-02-03 23:53:09 +00:00
Richard Davey
0610ddd15f SoundManager.setTouchLock is no longer set if SoundManager.noAudio is true, or if the PhaserGlobal setting disableAudio is true (thanks @bcjordan #2206) 2016-02-03 23:23:36 +00:00
Richard Davey
a4c5fb9660 BitmapData.drawGroup can now handle drawing Emitters and BitmapText objects that are part of the Group. 2016-02-03 23:08:54 +00:00
Richard Davey
3b686f906f Moved the Sound.disconnect after the Sound.stop call in Web Audio (#2280) 2016-02-03 22:22:22 +00:00
Richard Davey
a0eb44ec09 Group.add and Group.addAt would forget to remove the child from the hash of its previous Group if it had a physics body enabled, causing unbounded hash increase (thanks @strawlion @McIntozh #2232) 2016-02-03 21:51:01 +00:00
Richard Davey
10209dc8f5 GameObject.revive used to add the health amount given to the Game Object (via heal) instead of setting it as the new health amount. It now calls setHealth instead, giving it the exact amount (thanks @netgfx #2231)
GameObject.revive will now set the health amount to 100 instead of 1, bringing it in-line with the `maxHealth` default value.
2016-02-03 21:44:06 +00:00
Richard Davey
a1c3050bf7 Tilemap.getObjectIndex has been removed as it didn't work correctly in most cases, and it's easier to just scan the Tilemap.objects object directly anyway (#2242) 2016-02-03 21:35:35 +00:00
Richard Davey
3bc8dcd154 The width and height values passed to the Game constructor are now passed through Math.floor first. This ensures you can never create a game width non-integer dimensions, which has all kinds of implications - from browser performance to breaking things like TileSprite rendering (#2262) 2016-02-03 19:11:26 +00:00
Richard Davey
2d2101adcb Both transparent and antialias were ignored if set to false in a Game configuration object, as the parseConfig method didn't check for falsey values (thanks @amadeus #2302) 2016-02-03 12:28:12 +00:00
Richard Davey
e04504f481 Tweens with 'yoyo' set on them couldn't be re-used again because the start and end properties were left in a reversed state. When a yoyo tween ends it now restores the reversed values (thanks @SBCGames #2307) 2016-02-03 12:24:22 +00:00
Richard Davey
1883cfc83b BaseTexture.destroy no longer checks for the _pixiId property on the canvas before removing it from the CanvasPool, meaning it's now destroying a lot more canvas elements than it was in the past! 2016-02-03 11:41:37 +00:00
Richard Davey
034428e92c Sprite (and all Game Objects) have a new argument in their destroy method: destroyTexture. This boolean (which is false by default) controls if the BaseTexture of the Game Object should be destroyed or not. This is extremely useful in situations where you've got a lot of dynamic assets you no longer need, such as textures created from BitmapDatas. You must set the destroyTexture argument yourself. This can be done in a custom Game Object destroy method or as part of your state shutdown (#2261) 2016-02-03 11:41:37 +00:00
Richard Davey
8043d29aa6 BitmapData would always create a private _swapCanvas which was a clone of its main canvas used for advanced movement operations. This no longer happens. The swap canvas is created only as needed, by those functions that use it (specifically moveH and moveV), meaning a BitmapData will now use half the amount of memory it used to, and you'll have half the amount of canvas DOM elements created (unless you make heavy use of the move functions). 2016-02-03 11:41:37 +00:00
Richard Davey
297244a822 Merge pull request #2161 from puzzud/master
SinglePad.callbackContext is now set through addCallbacks method.
2016-02-03 01:38:20 +02:00
Richard Davey
75d6bbb251 Updated defs and improved jsdocs for #2277 2016-02-02 23:37:08 +00:00
Richard Davey
d4edbe6619 Merge pull request #2277 from slashman/exposeWrappedLinesOnText
Alow precalculating the results of text wrapping.
2016-02-03 01:32:49 +02:00
Richard Davey
ded2f72768 Docs update #2243 2016-02-02 23:04:54 +00:00
Richard Davey
88f1ea95d2 Fixed BitmapText.cleanText so it works properly with new-lines within the text.
BitmapText would crash if it tried to render a character that didn't exist in the font set. Any character that doesn't exist in the font set now renders a space character instead.

BitmapText would load and parse the kerning data from the font, but would never use it when rendering. The kerning values are now applied on rendering as well (thanks @veu #2165)
2016-02-02 22:54:01 +00:00
photonstorm
8cf96a2f78 Docs fix #2271 2016-02-02 16:28:33 +00:00
photonstorm
ddbc72cbf4 Docs update #2265 2016-02-02 16:26:20 +00:00
photonstorm
11fa0c2690 Docs fix #2310 2016-02-02 16:19:09 +00:00
Richard Davey
4e3c764207 Merge pull request #2248 from 06wj/dev
Fixed ScaleManager EXACT_FIT not working
2016-02-02 17:42:54 +02:00
Richard Davey
8e6b88cda8 Merge pull request #2172 from jonjanisch/dev
Inconsistency in arcade.collide processCallback param order #667
2016-02-02 17:39:46 +02:00
Richard Davey
92dae1951b Merge pull request #2204 from tfelix/master
Asset packs are now correctly spliced between waiting files.
2016-02-02 16:58:33 +02:00
Richard Davey
425ee09047 Sound.onEndedHandler now sets Sound.currentTime to be Sound.durationMS (thanks @stoneman1 #2237) 2016-02-02 01:08:45 +00:00
Richard Davey
e7820dbe85 SoundManager.destroy now calls AudioContext.close (thanks @stoneman1 #2237) 2016-02-02 01:08:35 +00:00
Richard Davey
acebd74c26 Merge pull request #2241 from s4wny/patch-1
Fixed misleading error message
2016-02-02 02:33:57 +02:00
Richard Davey
bceca55c8f Merge pull request #2222 from FracturedShader/patch-2
Update BitmapData.shiftHSL, limitValue -> clamp
2016-02-02 02:31:54 +02:00
Richard Davey
5893224f10 The Style object passed in to Phaser.Text is now cloned instead of referenced. This means you can adjust single Text instances without invaliding other Text objects using the same style object (thanks @asyncanup #2267) 2016-02-02 00:29:46 +00:00
Richard Davey
34aff350eb The Video game object used an anonymous bound function for both the 'ended' and 'playing' event listeners, meaning that they were never removed properly (thanks @ramalhovfc #2303) 2016-02-02 00:18:50 +00:00
Richard Davey
6a50e18bf0 Merge pull request #1610 from yigitozdemir/dev
On Ceiling Method Addition
2016-02-01 21:14:12 +02:00
Richard Davey
99b3ea4a1f Merge pull request #2285 from allenevans/bug-clearGLTextures
Fix cache reference bug in web GL context restoration.
2016-02-01 19:22:37 +02:00
Richard Davey
b3da35163a Merge pull request #2151 from jaminscript/logic-fix
Remove unnecessary variable
2016-02-01 19:16:02 +02:00
Richard Davey
1d2d707b32 Merge pull request #2168 from nlotz/dev
fix typos in API docs
2016-02-01 19:01:58 +02:00
Richard Davey
6a26b06e28 Merge pull request #2199 from javivi91/FixTweenOnStart
Fix tween hasStarted parameter
2016-02-01 18:58:33 +02:00
Richard Davey
e551254b52 Merge pull request #2209 from FracturedShader/patch-1
Update BitmapData.setHSL to accept 0
2016-02-01 18:57:29 +02:00
Richard Davey
fc5530657d Merge pull request #2236 from milkey-mouse/fix-datauri-error
Fix issue #2234: Errors in getAudioURL() and getVideoURL() when using blob: or data: URIs
2016-02-01 18:51:56 +02:00
Richard Davey
806f93bc84 Merge pull request #2251 from milkey-mouse/fix-404-success
Fix issue #2250: Loader.binary returns success on 404
2016-02-01 18:45:54 +02:00
Richard Davey
0b8fc6e7d0 Merge pull request #2284 from RetrocadeNet/tweenManagerStubMethodToPreventError
Added removeAll to TweenManager's stub so call from stageManager does…
2016-02-01 18:43:42 +02:00
Richard Davey
76e2dc66ee Fixed docs (#2216) 2016-02-01 16:42:03 +00:00
Richard Davey
6bfd94e07c Merge pull request #2244 from ttencate/dev
Rename inner loop variable from 'i' to 'j'
2016-02-01 18:34:03 +02:00
Richard Davey
37d9b3402d Merge pull request #2226 from milkey-mouse/fix-retrofont-smoothed
Change RetroFont.smoothed from string to boolean
2016-02-01 18:32:22 +02:00
Richard Davey
13cf12d08a Merge pull request #2297 from nexiuhm/master
loadUpdate() now gets a last update when loading is complete.
2016-02-01 18:20:19 +02:00
Richard Davey
8795792047 Merge pull request #2289 from staff0rd/grammar_fix
fixed grammar on update() comment
2016-02-01 18:18:05 +02:00
Richard Davey
6620890099 Merge pull request #2291 from zeterain/patch-2
Update documentation in ScaleManager.js
2016-02-01 18:17:17 +02:00
Richard Davey
25dae75af1 Merge pull request #2298 from Weedshaker/patch-1
Update FrameData.js
2016-02-01 18:16:43 +02:00
Richard Davey
d6dcd0e5c6 Merge pull request #2301 from samme/issue-2299
Stop only the named animation if `name` is passed
2016-02-01 18:12:45 +02:00
Richard Davey
dd02f0b482 Merge pull request #2304 from cy-ryo-fujiwara/bug-map-hastile
Fixed a bug of tilemap.hasTile
2016-02-01 18:10:09 +02:00
samme
ec4c2d4773 Emitter methods return the Emitter instance
to better allow chaining:

- at
- explode
- flow
- kill
- revive
- setAlpha
- setRotation
- setScale
- setSize
- setXSpeed
- setYSpeed
- start
2016-01-20 13:34:08 -08:00
Ryo Fujiwara
b75d6c4a92 Fixed a bug of map.hasTile 2016-01-19 12:40:02 +09:00
samme
e9a4f6d3f7 Stop only the named animation if name is passed
Fixes #2299
2016-01-17 12:34:57 -08:00
nexiuhm
bc00f924a7 Added a check to avoid calling the function when doing dynamic loading after state is created. 2016-01-14 17:23:52 +01:00
nexiuhm
1c65c48341 onLoadUpdate now recives the last ( 100 ) update. 2016-01-14 17:09:41 +01:00
Silvan Strübi
b30dd225c3 Update FrameData.js
"Uncaught TypeError: Cannot read property 'index' of undefined"

The above error occurred, after updating https://github.com/englercj/phaser-tiled to be compatible with Phaser version 2.4.4. The above change fixed this issue!
2016-01-14 14:41:26 +09:00
photonstorm
d7b6d4e784 jshint fix (missing semi-colon) 2016-01-13 16:15:46 +00:00
photonstorm
70437a0bdd Clean text automatically on creation. 2016-01-13 15:18:42 +00:00
photonstorm
6a868cba5e BitmapText.cleanText is a new method that will scan the given text and either remove or replace all characters that are not present in the font data. It is called automatically by BitmapText.updateText. 2016-01-13 15:15:51 +00:00
photonstorm
36d9c8d673 Changed from a space to '' and added 'replace' argument. 2016-01-13 15:14:14 +00:00
zeterain
9edec8da57 Update documentation in ScaleManager.js
Documentation for ScaleManager.compatibility mis-spelled the supportsFullScreen property.
2016-01-11 09:02:07 -07:00
Stafford Williams
16517cc773 fixed grammar on update() comment 2016-01-08 20:29:58 +11:00
Allen Evans
1a02d2da6c Fix cache reference bug in web GL context restoration. 2016-01-06 07:35:53 +00:00
Maurycy Zarzycki
fe86dab721 Added removeAll to TweenManager's stub so call from stageManager doesn't throw errors 2016-01-05 21:03:04 +01:00
slash
5cc6b5962b Add missing assignations required for wrapping calculations to work
correctly
2016-01-03 16:54:27 -05:00
slash
ef7c2c6275 Alow precalculating the results of text wrapping. This may be useful for
example if the developer wants to control pagination, in which case
he may know in advance the total number of lines the text will wrap to,
and then set it on batches.
2016-01-03 16:33:33 -05:00
Milkey Mouse
d1c4297802 Fix #2250
changes by @mhstar89
2015-12-09 19:54:48 -08:00
墨水
ba0683b4d0 Fixed ScaleManager EXACT_FIT not working 2015-12-09 09:55:40 +08:00
Thomas ten Cate
cfd924d931 Rename inner loop variable from 'i' to 'j'
Fixes #2233
2015-12-03 16:22:34 +01:00
photonstorm
172f972d8c Pausing a Sound that used a Marker for playback would fire the onMarkerComplete signal by mistake as well as stop the fadeTween. This Signal is now only dispatched if Sound.stop is called and the Sound isn't paused (thanks Corin) 2015-12-02 12:41:20 +00:00
Sony?
70c64eb8fa Fixed misleading error message
Shouldn't it be `tileset` instead of `key`?

We can't find any entry with the name `tileset` in the JSON file. The `key` hasn't anything to do with the JSON file, that is our tilesset image we loaded with thaser.
2015-12-02 10:05:52 +01:00
Milkey Mouse
0c2e8d8ce9 Implement jackfreak's changes (Issue #2234) 2015-11-30 14:07:22 -08:00
Robert Plante
8f1450ecca Update to BitmapData.setHSL to follow conventions 2015-11-23 12:46:12 -05:00
Milkey Mouse
19845eb691 Changed RetroFont.smoothed from string to boolean 2015-11-22 21:37:28 -08:00
photonstorm
83948f5882 Updated Filter docs (#2223) 2015-11-20 17:01:05 +00:00
Robert Plante
45195848bc Update BitmapData.shiftHSL, limitValue -> clamp
`math.limitValue` does not exist so it was changed to `math.clamp` which provides the desired functionality.
2015-11-17 15:34:42 -05:00
Robert Plante
e236cac1e6 Update setHSL
Checking `if (h)` yields `false` when `h = 0`, but 0 is an acceptable value here. Had to decide between caching HSL verification and doing `typeof` 3x/pixel and opted for the temporary variables.
2015-11-17 14:15:26 -05:00
photonstorm
609b38c6e1 BitmapData.update causes a snowballing memory leak under WebGL due to a Context.getImageData call. BitmapData.clear used to call update automatically but no longer does. This resolves the issue of the Debug class causing excessive memory build-up in Chrome. Firefox and IE were unaffected (thanks @kingjerod #2208) 2015-11-17 14:07:56 +00:00
photonstorm
3d1306d440 jsdoc fix. 2015-11-17 14:07:48 +00:00
tfelix
734eba7f84 Asset packs are now correctly spliced between waiting files. 2015-11-15 02:48:05 +01:00
photonstorm
8b0224e7b4 TilemapParser accidentally redeclared i when parsing the ImageCollections which would cause an infinite loop (thanks DanHett) 2015-11-12 13:39:42 +00:00
Javier Alcantara
840b49b6cd Tween hasStarted parameter set to false when tween finishes 2015-11-11 18:39:05 +01:00
photonstorm
1c169ef571 Video jsdoc fixes. 2015-11-02 11:51:15 +00:00
BdR76
ff98bf6737 Bugfix, reuse emitter when parameter explode=false
There is a bug when calling emitter.start() consecutively with parameter explode=false. The bug will cummulatively add particles, so for example when quantity=10, the first call to .start() will emit 10 particles, then next 20, then 30 etc.

Also see forum post here
http://www.html5gamedevs.com/topic/3920-repeated-calls-to-emitterstart-spawns-increasing-number-of-particles/
2015-11-01 16:41:02 +01:00
Richard Davey
799efa3079 You can use the new const Phaser.PENDING_ATLAS as the texture key for any sprite. Doing this then sets the key to be the frame argument (the frame is set to zero). This allows you to create sprites using load.image during development, and then change them to use a Texture Atlas later in development by simply searching your code for 'PENDING_ATLAS' and swapping it to be the key of the atlas data. 2015-10-31 01:04:14 +00:00
Jonathan Janisch
24c85dbb35 Inconsistency in arcade.collide processCallback param order #667 2015-10-27 23:48:14 -04:00
mattrick
518c2f6ab7 Merge branch 'dev' of https://github.com/mattrick16/phaser into dev 2015-10-27 17:00:10 -07:00
mattrick
8843a4ad09 Add worldAngleToPointer 2015-10-27 16:55:23 -07:00
nlotz
da45d04a70 fix typos in API docs 2015-10-27 09:10:14 +01:00
puzzud
c31d8dc78a Reinstated fix for #1285, regarding setting Phaser.SinglePad.callbackContext in addCallbacks method. 2015-10-24 20:13:49 -04:00
puzzud
492fdc98eb Phaser.SinglePad.addCallbacks now sets member callbackContext to the first parameter, context. 2015-10-24 20:01:44 -04:00
Ben Abbott
1dadaf5590 Remove unnecessary variable
This commit removes an unnecessary variable which was defined, populated but never used.
2015-10-22 13:47:06 +13:00
Richard Davey
e6aa9f83c9 Typo fix. 2015-10-19 23:18:23 +01:00
photonstorm
efc69ff463 Buttons (or any Sprites) that don't have a texture, but have children, would incorrectly render the children under WebGL due to the baseTexture.skipRender property (thanks @puzzud #2141) 2015-10-16 16:44:51 +01:00
photonstorm
8a4a1528e4 Preparing for 2.4.5 dev. 2015-10-15 12:22:01 +01:00
photonstorm
d5f1b43a2d Added skipRender to FastSpriteBatch. 2015-10-15 11:42:53 +01:00
photonstorm
99751a5e8e BaseTexture.skipRender is a new boolean that can be set to skip the rendering phase in the WebGL Sprite Batch. You may want to do this if you have a parent Sprite with no visible texture (i.e. uses the internal __default texture) that has children that you do want to render, without causing a batch flush in the process. 2015-10-15 11:39:59 +01:00
photonstorm
79d6993f26 Fixed issue with Time.update not being properly set in IE9 / setTimeout environments. 2015-10-13 14:23:36 +01:00
photonstorm
d1233ad229 Phaser 2.4.4 RC1. 2015-10-13 14:10:55 +01:00
photonstorm
45d92d4217 ScaleMin and ScaleMax stopped working in Phaser 2.3.0 due to an incorrect transform callback scope (thanks @brianbunch #2132) 2015-10-13 13:32:55 +01:00
photonstorm
bd53b61ffd Sprite.getBounds would report an inaccurate value if the sprite was negatively scaled (causing things like generateTexture to be cut off) (thanks @DavidAPC #2108) 2015-10-13 13:02:49 +01:00
photonstorm
84373dc478 Removed use of the tilePosition property in the Phaser.Rope class as it isn't implemented and caused calls to Rope.reset to crash (thanks @spayton #2135) 2015-10-13 12:20:02 +01:00
photonstorm
8e4dc1f078 ScaleManager.getParentBounds now checks if parentNode has an offsetParent before calling getBoundingClientRect on it (thanks @McFarts #2134) 2015-10-13 12:04:57 +01:00
photonstorm
b91de47d8d Readme and JSDocs updates. 2015-10-13 12:01:08 +01:00
Richard Davey
3ee59f1de3 Merge pull request #2118 from pnstickne/wip-2031
Created Phaser.KeyCode enumeration / pseudo-type
2015-10-13 13:56:46 +03:00
Richard Davey
e097a1227e Merge pull request #2052 from nickryall/fix-for-text-centered-on-sprite
adjust wrapped text that is centered to sprite via anchor
2015-10-13 13:50:11 +03:00
Richard Davey
5f704f0b0f Merge pull request #2130 from noidexe/patch-5
Better default value for suggestedFps
2015-10-13 13:47:15 +03:00
Richard Davey
4e208c74ce Merge pull request #2128 from nlotz/nlotz-loader-cache-addbitmapfont-apply-default-spacing
Fixes for Cache::addBitmapFont(...)
2015-10-13 13:43:50 +03:00
photonstorm
c79a341c58 Fixed jshint errors. 2015-10-12 12:23:48 +01:00
photonstorm
e01a754732 Removed the FrameDebugger and moved to its own branch. 2015-10-12 11:10:37 +01:00
Lisandro Lorea
dea95ec6f6 Better default value for suggestedFps
In any game that handles fps issues as seen in http://phaser.io/examples/v2/time/slow-down-time the game will hang if game.fpsProblemNotifier fires early on, before game.time.suggestedFps has any value other than null. 

The docs recommend waiting a few seconds before accesing suggestedFps. Since it's hard to tell exactly how long "a few seconds" is, shouldn't suggestedFps be initialized to the same value as desidedFps? 

I think it's better to get an inaccurate value for a few frames than an invalid value. It means users don't have to care about the specifics of how and when suggestedFps gets its value.
2015-10-09 16:14:52 -03:00
Nikolas Lotz
6d4dad7bb4 Apply default X/Y-Spacing
Applies default X/Y-Spacing when omitted as a parameter
2015-10-08 20:14:16 +02:00
Richard Davey
8dc8d7dd72 Added fd to the renderSession to stop the FrameDebugger breaking in TilingSprite under WebGL. 2015-10-07 22:15:20 +01:00
Richard Davey
3d5fac1817 Merge pull request #2111 from jdnichollsc/master
Takes any transforms into account to get the correct parent bounds
2015-10-06 19:08:02 +03:00
photonstorm
bf0bd9657e Updated readme and build scripts. 2015-09-30 11:20:14 +01:00
photonstorm
9013107fd1 The ScaleManager no longer creates a Phaser.FlexGrid if the class isn't available (i.e. excluded via a custom build) 2015-09-30 11:20:00 +01:00
photonstorm
e31c7d1f5a Fixed issue with TileSprites not excluding correctly from custom builds. 2015-09-30 11:19:29 +01:00
photonstorm
6d0aa613ad New Create stub added for the custom build process. Cuts file size by 8KB. 2015-09-30 11:19:05 +01:00
photonstorm
6fd2b6a7ec Phaser.Create no longer automatically creates a BitmapData object when it starts. It now only does it when you first make a texture or grid. 2015-09-30 11:18:53 +01:00
Paul
531cd49f06 Created Phaser.KeyCode enumeration / pseudo-type
- Impact: none/foward-migration; fully backwards compatible

- Moves the key code constants in Keyboard to a KeyCode type.
  - Duplicates the KeyCodes in the Keyboard object for backward
    compatiblity.
  - KeyCode properties are listed in documentation

- Updates documentaion to refer to Phaser.KeyCode

- Adds in future 'keycode' expansion capabilities,
  as indicated by the KeyCode documentation, if the constants
  are used in code.

Closes #2031
2015-09-29 17:59:26 -07:00
Richard Davey
884acb0616 New Scale Manager stub added. Removes all Scale Manager handling from Phaser! But saves 75KB in the process. If you know you don't need to scale the Phaser canvas, or are handling that externally, then you can safely stub it out in a custom build. 2015-09-29 16:06:49 +01:00
Richard Davey
c1d0ec0f34 Local vars to reduce file size. 2015-09-29 16:06:44 +01:00
Richard Davey
8d5e27a49f New DOM stub added for the custom build process. Contains just the bare minimum of functions that Phaser needs to work. Cuts file size from 14.8KB to 2.4KB. Note: Do not stub this out if using the full Scale Manager. 2015-09-29 16:06:27 +01:00
Richard Davey
64eebbb6d2 New Color stub added for the custom build process. Contains just the bare minimum of functions that Phaser needs to work. Cuts file size from 48.7KB to 7.4KB. Note: Do not stub this out if using BitmapData objects. 2015-09-29 16:06:15 +01:00
Richard Davey
8899eddd9a BitmapData.clear now automatically calls BitmapData.update at the end of it. 2015-09-29 14:02:26 +01:00
Richard Davey
5a275f14a8 Removing dead code. 2015-09-28 03:26:27 +01:00
Richard Davey
84a566bf79 Added guard around the blend mode setter. 2015-09-27 01:44:38 +01:00
Richard Davey
cbf9b3f71f WebGLRenderer.mapBlendModes optimised to cut down on file size. 2015-09-26 00:58:02 +01:00
Juan David Nicholls Cardona
8ce70cbeb4 Takes any transforms into account to get the correct parent bounds 2015-09-25 15:42:29 -05:00
Nikolas Lotz
33503e7fa7 adds missing API doc param to addBitmapFont()
added missing API doc parameter "atlasType" to Cache::addBitmapFont(...)
2015-09-24 19:18:04 +02:00
Richard Davey
d0930bc161 Keyboard.addCallbacks didn't check to see if the arguments were null, only if they were undefined making the jsdocs misleading. 2015-09-23 23:18:36 +01:00
photonstorm
832034af94 Typo fix. 2015-09-23 14:04:04 +01:00
Richard Davey
cffc90ebbc Merge pull request #2107 from JackMorganNZ/master
Corrected spelling: 'mainted' to 'maintained'
2015-09-23 11:21:21 +03:00
Jack Morgan
589b9b8edd Corrected spelling: 'mainted' to 'maintained' 2015-09-23 12:03:54 +12:00
photonstorm
de5283b989 The default Button.onOverMouseOnly value has changed from false to true. If you used this in your touch enabled games then please be aware of this change (#2083) 2015-09-22 15:24:52 +01:00
photonstorm
0dee1157fc PIXI.WebGLRenderer.updateTexture now returns a boolean depending on if the texture was successfully bound to the gl context or not.
PIXI.WebGLSpriteBatch.renderBatch would still try and render a texture even if `updateTexture` failed to bind it. It now checks the return value from `updateTexture` and ignores failed binds.
2015-09-22 15:20:23 +01:00
photonstorm
2633f8ce6d InputHandler.validForInput now checks if the game object has input.enabled set to false and doesn't validate it for input if that's the case. 2015-09-22 15:20:23 +01:00
Richard Davey
9f08442304 Merge pull request #2103 from pnstickne/wip-2062
Fixes #2062 and forward-support for pointer modes
2015-09-22 17:14:32 +03:00
photonstorm
389b6dd1aa Fixed for jshint. 2015-09-22 12:07:14 +01:00
photonstorm
f64fc42f3e The SoundManager now detects if the browser is running under iOS9 and uses a touchend callback to unlock the audio subsystem. Previous versions of iOS (and Android) still use touchstart. This fixes Apple's screw-up with regard to changing the way Web Audio should be triggered in Mobile Safari. Thanks Apple (thanks @MyCatCarlos for the heads-up #2095) 2015-09-22 11:46:58 +01:00
photonstorm
d16de32fe3 Device.iOSVersion now contains the major version number of iOS. 2015-09-22 11:46:20 +01:00
photonstorm
27457c2b0f Touch.addTouchLockCallback has a new argument onEnd which allows the callback to fire either on a touchstart or a touchend event. 2015-09-22 11:46:08 +01:00
Paul
31e5202eff Fixes #2062 and forward-support for pointer modes
Impact:
  - *none for touch devices*
  - *low* / 'expected behavior' for mouse devices

Adds a PointerMode enumeration value for better simple input
discrimination in the future.

The added Button#justReleasedPreventsOver controls if a just-release event
on a pointer prevents it from being able to trigger an over event.

The default value is PointerMode.CONTACT which means this 'release guard'
applies only to touch inputs.

It should fix #2062 as Mouse (PointerMode.CURSOR) input is not caught in the default.

Also expands Button#forceOut to accept a PointerMode value such that it
can be controlled per-input mode.

This is a configurable partial revert of a possibly rogue commit in 2.1.3
and the behavior persists through 2.4.3.
2015-09-22 01:12:43 -07:00
Richard Davey
d86d01bd25 Camera.setBoundsToWorld only adjusts the bounds if it exists (thanks @prudolfs #2099) 2015-09-20 21:07:28 +01:00
Richard Davey
4143b3f3ae rnd check fix. 2015-09-19 11:58:25 +01:00
Richard Davey
96de58cc5f Added lots more info to the jsdocs and tidied up the code for #2056 2015-09-19 11:50:26 +01:00
Richard Davey
a445a9943f Merge pull request #2056 from luckylooke/featGeneratorState
Feature: Allow random generator to get/set state
2015-09-19 13:19:19 +03:00
Richard Davey
9f0628e2bc Merge pull request #2093 from Garbanas/feature/p2-phaser-polygon
(Resource: PhysicsEditor Exporter) Add option to prefix shape name and optimize JSON output
2015-09-19 13:14:14 +03:00
Richard Davey
11de8b1944 Merge pull request #2097 from pnstickne/wip-2092
Fixes edge case when TilingSprite removed before render
2015-09-19 13:09:53 +03:00
Paul
48566e74c5 Fixes edge case when TilingSprite removed before render
- Issues caused when TilingSprite is destroyed before it has
  ever been rendered because `canvasBuffer` not created yet.

Fixes #2092
2015-09-18 20:34:13 -07:00
Christoph Dörfel
a8c4930d42 Add JsDoc comment for Body#addPhaserPolygon return value 2015-09-17 12:11:49 +02:00
photonstorm
b011146a87 Fixed lint errors. 2015-09-16 13:55:33 +01:00
photonstorm
e64f9647db Better output. Need to fix jshint errors next. 2015-09-16 13:36:53 +01:00
photonstorm
09e8d465e4 Lots more work on the FrameDebugger. Just need texture preview and then can test it properly. 2015-09-16 13:17:06 +01:00
Christoph Dörfel
4c9412088c Add option to prefix shape name and optimize JSON output 2015-09-16 14:00:24 +02:00
Richard Davey
61edd1b458 FrameDebugger can now handle Text and BitmapText. 2015-09-16 03:18:15 +01:00
Richard Davey
b89f6dd3b4 Much improved final output and logging process. 2015-09-16 02:25:57 +01:00
Richard Davey
29b4bb3174 :) 2015-09-16 02:25:40 +01:00
Richard Davey
66aca82084 Removed duplicate call. 2015-09-16 02:25:32 +01:00
Richard Davey
4828415d97 Merge pull request #2090 from pnstickne/wip-2088
Updated documentation to clarify 'types' of time
2015-09-15 19:12:02 +03:00
Richard Davey
b6a67cc795 Merge pull request #2091 from noidexe/patch-4
Fix for tile ids between 0x7FFFFFFF and 0xFFFFFFFF
2015-09-15 19:11:36 +03:00
photonstorm
3be0ed8849 FrameDebugger now hooked into Canvas Renderer. Better output coming. 2015-09-15 16:14:14 +01:00
photonstorm
4c5dfc4847 Optimised getSmoothingEnabled, setSmoothingEnabled and setImageRenderingCrisp. 2015-09-15 14:18:00 +01:00
photonstorm
b9fcb7f179 Optimised size of PIXI.CanvasRenderer.mapBlendModes and started removal of options object. 2015-09-15 13:54:17 +01:00
photonstorm
646380f710 Tweaked Canvas.getSmoothingEnabled and Canvas.setSmoothingEnabled to early out on more common browsers.
Added Canvas.getSmoothingPrefix
2015-09-15 13:43:52 +01:00
photonstorm
4125e42a06 Sorted out setting the Stage backgroundColor. Much more concise now. 2015-09-15 13:34:07 +01:00
photonstorm
5f77c70309 jsdoc fix. 2015-09-15 13:33:42 +01:00
photonstorm
8069560aaf No longer needed. 2015-09-15 12:53:44 +01:00
photonstorm
6784a9c1df Optimised render loop slightly. Moved properties to game. 2015-09-15 12:53:44 +01:00