photonstorm
15d952171c
SoundManager.destroy doesn't close the context if it's being stored in PhaserGlobal (thanks @brianbunch #2356 )
2016-02-26 13:31:45 +00:00
photonstorm
cc3a07bada
SoundManager.close now validates that context.close is a valid function before calling it (thanks @brianbunch #2355 )
2016-02-26 13:29:35 +00:00
photonstorm
c04a2be36b
Format updates.
2016-02-26 13:26:27 +00:00
Richard Davey
6ba5515995
Merge pull request #2357 from FilamentGames/dev
...
Patch for destructive getLocalBounds in PIXI.DisplayObjectContainer
2016-02-26 15:21:17 +02:00
Richard Davey
a8ae5a0024
Merge pull request #2353 from fillmoreb/patch-1
...
Fix for world.centerX and world.centerY with negative bounds origin.
2016-02-26 15:20:05 +02:00
Richard Davey
e21ec2f0d6
Merge pull request #2349 from stoneman1/dev
...
Fixed issue with IE crashing on this.context.close() in SoundManager.…
2016-02-26 15:17:28 +02:00
Alex Stone
db7c417baf
Reset worldTransforms of children after computing local bounds.
2016-02-25 20:37:09 -06:00
fillmoreb
b1c74e694e
Update World.js
...
Phaser.World.centerX and Phaser.World.centerY only worked if the bounds had an origin of 0,0. This change takes into account the actual origin.
2016-02-25 11:58:22 -07:00
Stoneman1
62f0a52544
Fixed issue with IE crashing on this.context.close() in SoundManager.js (There was no check if context exists)
2016-02-24 13:08:37 +02:00
photonstorm
ba5981a03f
Removed a console.log from the TilingSprite generator.
2016-02-19 14:46:55 +00:00
Stoneman1
4d587d3e40
Fixed issue with not removing mouseoutglobal eventlistener
2016-02-19 15:15:31 +02:00
photonstorm
ad6f0557f7
Preparing for 2.4.7 development.
2016-02-18 15:06:43 +00:00
photonstorm
47123c192d
2.4.6 Build files + docs + TS Docs.
2016-02-18 14:41:53 +00:00
photonstorm
866994743b
URI + ? fix.
2016-02-18 14:34:20 +00:00
photonstorm
0b5a4391f1
StateManager.destroy now sets clearCache
and clearWorld
internally before clearing the current state, as otherwise they would have been left untouched, such as from Game.destroy (thanks @i-dimitrov #2138 )
2016-02-18 13:10:54 +00:00
Richard Davey
6cf8bc75ba
Merge pull request #2328 from taylankasap/dev
...
Added RandomDataGenerator.sign (returns -1 or +1)
2016-02-18 15:03:51 +02:00
photonstorm
17071b578c
BaseTexture.destroy wasn't correctly removing the texture from the BaseTextureCache if it was a cached CanvasPool entry (such as Text objects use), causing drawImage errors in Canvas mode, and just blank textures in WebGL (thanks @civet #2339 )
2016-02-18 12:59:40 +00:00
photonstorm
46cc05a377
Groups now check for child.parent
before calling removeFromHash
(thanks @spayton #2323 #2338 )
2016-02-18 12:29:01 +00:00
Richard Davey
8aefd0fe9b
Preparing for 2.4.6 development.
2016-02-17 16:28:27 +00:00
photonstorm
daea5f53ff
Fixed Edge device check.
2016-02-17 13:37:32 +00:00
photonstorm
34c484367c
Phaser 2.4.5 Build files.
2016-02-17 13:27:09 +00:00
Richard Davey
e6c508edcd
Color.updateColor would pass color.a
to the getColor32
method without first putting the value into the range 0 - 255 (thanks @mainpsyhos #2327 )
2016-02-17 03:50:06 +00:00
Richard Davey
f6d273c4fc
DisplayObject._generateCachedSprite (which is called from updateCache
or when cacheAsBitmap
is enabled) would bitwise | 1 the bounds width and height. This would often lead to incorrect rounding (heights of 4 would become 5, while heights of 5 would remain 5). This has now been removed and the width and height are passed through Mail.ceil and then checked to make sure they aren't less than 1 pixel in either direction (thanks @alesdotio #2078 )
2016-02-17 03:40:04 +00:00
Richard Davey
b629539176
SpriteBatch incorrectly applied the PIXI SpriteBatch prototype over the top of Phaser.Group meaning that Sprites with animations wouldn't render correctly (thanks @qdrj #1951 )
2016-02-17 03:23:56 +00:00
Richard Davey
0c52b9316a
Text with lineSpacing set wouldn't apply the lineSpacing to the final line of text in the Text string, or to text with just single lines. This could lead to incorrect height calculations for further layout and unwanted padding at the bottom of Text objects (thanks @Lopdo #2137 )
2016-02-17 03:14:51 +00:00
Richard Davey
15411f1e56
Tween.onLoop would be fired when a Tween repeated and Tween.onRepeat would be fired when a Tween looped. These are now reversed to fire correctly (thanks @vladkens #2024 )
2016-02-17 02:57:45 +00:00
Richard Davey
071d9cffd0
Graphics.generateTexture has a new argument padding
which allows you to add extra spacing onto the generated texture. This is useful for small Graphics objects where you find a few pixels getting sliced off the edges due to rounding issues ( #1933 )
2016-02-17 02:31:29 +00:00
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
photonstorm
ff254ec33b
Added clearBeforeRender boolean.
2015-09-15 12:53:44 +01:00
photonstorm
0ee95b22d6
Fixed rogue comma.
2015-09-15 12:53:44 +01:00
photonstorm
b99c9e22ec
Removed PIXI.Stage. Phaser.Stage now handles everything it needs to do.
2015-09-15 12:53:44 +01:00
photonstorm
705cacf2ca
Sorting out the Stage background color assignment so we can drop a boolean check in the render method.
2015-09-15 12:53:43 +01:00
photonstorm
5a1a918a5d
Added FrameDebugger.
...
Tidying up the renderer constructors.
2015-09-15 12:53:43 +01:00
photonstorm
06ed961e81
Added FrameDebugger into the mix.
2015-09-15 12:53:43 +01:00
photonstorm
5ceb9914b9
Bumped verison number. Removed default render options (as they're set in Phaser.Game).
2015-09-15 12:53:43 +01:00
photonstorm
daef7d5bfc
Consolidating Pixi into Phaser. Removed options object, values all game from Game anyway so it saves space. Starting to move to jsdocs from yuidocs.
2015-09-15 12:53:43 +01:00
Lisandro Lorea
daff43fd77
Fix for tile ids between 0x7FFFFFFF and 0xFFFFFFFF
...
2147483647 tile ids should be enough for anybody, but it is now working for any valid tile id.
2015-09-15 01:36:13 -03:00
Paul
9733fb4ec2
Updated documentation to clarify 'types' of time
...
- Added 'Types of time' description and cross-links
- Also some general documentation update for Timer
- Type specialization
Ref #2088
2015-09-14 20:21:47 -07:00
Lisandro Lorea
f52ca58d7d
Correctly interpret binaryString as a sequence of uint32-le values
...
The previous implementation was ignoring the 3 most significant bytes of each value and would result on improper parsing of any map with tile ids higher than 255
2015-09-14 20:38:58 -03:00
photonstorm
a8e972b25a
Under setTimeOut (or when forceSetTimeOut
was true) the Time was incorrectly setting Time.timeExpected
causing game updates to lag (thanks @satan6 #2087 )
2015-09-14 16:31:16 +01:00
photonstorm
5c30a228bb
Fixed assignment of TEXTURE_ATLAS_JSON_PYXEL constant ( #2050 )
2015-09-14 11:23:31 +01:00
Richard Davey
1c7b33107f
Merge pull request #2050 from joshpmcghee/dev
...
Feature: Add support for loading single-layer Pyxel Edit TileMap as an Atlas
2015-09-14 13:21:21 +03:00
Richard Davey
f8ef567641
Merge pull request #2081 from pnstickne/wip-inputhandler-docs2
...
Fixes incorrect "Pointer" type documentation and parameter names in InputHandler
2015-09-14 13:15:08 +03:00
Lisandro Lorea
8528f0c700
Fixed variable naming style
2015-09-13 12:15:02 -03:00
Lisandro Lorea
308ce6b57c
Add support for TiledJSON with base64 encoding
...
Tiled 0.13.0 added support for layer data compression when exporting as LUA or JSON. This means that any .tmx stored unsing base64 encoding will start exporting layer data as a base64 encoded string rather than a native array.
Phaser would try to load the level anyway without emitting any errors, resulting in a corrupted level while playing.
This PR adds detection and support for base64 encoded levels as long as they don't use compression.
2015-09-13 12:07:57 -03:00
Paul
4474b8fde3
Fixes incorrect type and parameter names
...
- Impact: none; documentation and local variable names only
- Incorrect documentation that claimed to take a Pointer when they really
took a Pointer ID is fixed
- Also updates parameter names for consistenct/clarity
2015-09-12 17:32:40 -07:00
photonstorm
816bcaca75
Missing physicsElapsed value reset.
2015-09-10 16:05:15 +01:00
photonstorm
8db23545da
jsdoc updates.
2015-09-10 15:57:55 +01:00
Richard Davey
96dae9bf2e
Merge pull request #2055 from pmcmonagle/dev
...
Added useCapture flags to removeEventListener where approriate
2015-09-10 00:03:19 +03:00
Richard Davey
6c9e43ad36
DeviceButton was setting a duration
property on itself, which went against the read only getter of duration (thanks @winstonwolff)
2015-09-09 21:58:50 +01:00
photonstorm
90a500ec1e
Game.update could call updateLogic
multiple times in a single frame when catching up with slow device frame rates. This would cause Tweens to advance at twice the speed they should have done (thanks @mkristo)
...
Time.desiredFpsMult is a pre-calculated multiplier used in Game.update.
Time.refresh updates the `Time.time` and `Time.elapsedMS` values and is called automatically by Game.update.
2015-09-09 12:09:18 +01:00
Richard Davey
aaecf14c12
Merge pull request #2069 from Pappa/master
...
Fix for AudioBufferSourceNode listener memory leak.
2015-09-08 21:40:19 +03:00
Pappa
12d24d3677
Fix for AudioBufferSourceNode listener memory leak.
...
In Chrome, the AudioBufferSourceNode onended listeners were never being garbage collected. This frees up the listener for collection.
2015-09-08 17:56:17 +01:00
photonstorm
2de83328d9
Testing Tween timer fix.
2015-09-08 17:44:28 +01:00
photonstorm
7487c15f0e
Doc updates.
2015-09-08 15:56:28 +01:00
photonstorm
dbcff585e0
Time.desiredFps has moved to a getter / setter.
...
Time.physicsElapsed and Time.physicsElapsedMS are no longer calculated every frame, but only when the desiredFps is changed.
Time.update has been streamlined and the `updateSetTimeout` and `updateRAF` methods merged and duplicate code removed.
2015-09-08 15:56:19 +01:00
luckylooke
63f5df9c65
Feature: Allow random generator to get/set state
2015-09-07 21:47:36 +02:00
Richard Davey
d7a42370a4
BitmapData.move, moveH and moveV have a new optional wrap
argument allowing you to control if the contents of the BitmapData are wrapped around the edges (true) or simply scrolled off (false).
2015-09-07 01:16:43 +01:00
Richard Davey
8210d4faa1
Removed tween console.log for now.
2015-09-07 00:26:03 +01:00
Paul McMonagle
ad38fff083
Reordered removeEventListener calls to match addEventListener order
2015-09-04 17:11:50 -04:00
Richard Davey
1e7f8dddd9
jsdoc fix.
2015-09-03 00:46:48 +01:00
Richard Davey
38eca4d5b9
Filter.addToWorld allows you to quickly create a Phaser.Image object at the given position and size, with the Filter ready applied to it. This can eliminate lots of duplicate code.
2015-09-03 00:46:47 +01:00
Paul McMonagle
c2bf22ef7c
Added useCapture flags to removeEventListener where approriate
...
Event listeners added with true passed in as the useCapture flag are only removed when true is also passed into the removeEventListener call. Adding this flag to the stop method where appropriate fixes a memory leak in IE where events on window are never removed.
See https://msdn.microsoft.com/en-us/library/ff975250(v=vs.85).aspx
2015-09-02 14:36:49 -04:00
photonstorm
37fc327ea7
Tween elapsed debug.
2015-09-02 16:58:51 +01:00
photonstorm
8833a509eb
jsdoc fix.
2015-09-02 16:16:52 +01:00
nickryall
ca795af457
adjust wrapped text that is centered to sprite via anchor
2015-09-02 10:50:03 +12:00
Josh McGhee
fb249b2a41
cleaning up to obey jshint
2015-09-01 01:10:56 +01:00
Josh McGhee
4a19aca212
some cleaning up and documentation polish
2015-09-01 01:03:51 +01:00
Josh McGhee
cbd7265bee
cherry pick commits from master. Read: I'm not clever.
2015-09-01 00:57:54 +01:00
Richard Davey
41906c5ac1
When the Text width was being calculated it would add the strokeThickness
value twice, causing an alignment offset (thanks @nickryall #2039 )
2015-08-31 11:33:18 +01:00
Richard Davey
adcc5d3afb
Merge pull request #2047 from Garbanas/feature/p2-remove-collision-group
...
Convenience function to remove a collision group from a P2 Body
2015-08-31 13:12:13 +03:00
Richard Davey
c10c7cdf2a
Merge pull request #2044 from rblopes/dont-prefix-data-urls
...
Prevent 'data:' URLs from being prefixed
2015-08-31 13:08:22 +03:00
Richard Davey
af194d447c
jsdoc fix #2049
2015-08-31 10:57:54 +01:00
Christoph Dörfel
96441fdb27
Set correct default value for 'clearCallback' on P2.Body.removeCollisionGroup
2015-08-30 01:30:33 +02:00
Christoph Dörfel
2623ddeaf7
Convenience function to remove a collision group from a P2 Body
2015-08-30 00:19:37 +02:00
Rafael Barbosa Lopes
1485fd110a
Updated to use a matching expression instead.
...
Replaced the booleans with a matching expression. Now, URLs
beginning with the following patterns will be ignored:
- blob:
- data:
- http://
- https://
- //
As suggested by @pnstickne.
2015-08-28 17:19:24 -03:00
Rafael Barbosa Lopes
14632cdfb5
Prevent 'data:' URLs from being prefixed
...
Fixes an issue where 'data:' URLs may get prefixed by
`#baseURL` and `#path` properties making these URLs invalid.
2015-08-28 15:14:30 -03:00
photonstorm
32b0c98f7a
Group.resetChild is a new method that allows you to call both child.reset
and/or child.loadTexture
on the given child object. This is used internally by getFirstDead
and similar, but is made public so you can use it as a group iteration callback. Note that the child must have public reset
and loadTexture
methods to be valid for the call.
...
Group.getFirstDead, Group.getFirstAlive and Group.getFirstExists all have new optional arguments: `createIfNull`, `x`, `y`, `key` and `frame`. If the method you call cannot find a matching child (i.e. getFirstDead cannot find any dead children) then the optional `createIfNull` allows you to instantly create a new child in the group using the position and texture arguments to do so. This allows you to always get a child back from the Group and remove the need to do null checks and Group inserts from your game code. The same arguments can also be used in a different way: if `createIfNull` is false AND you provide the extra arguments AND a child is found then it will be passed to the new `Group.resetChild` method. This allows you to retrieve a child from the Group and have it reset and instantly ready for use in your game without any extra code.
2015-08-28 12:23:48 +01:00
photonstorm
f0d7da1c56
Removed RND.float as it's a reserved word :(
...
Fixed jshint errors.
2015-08-27 19:28:01 +01:00
photonstorm
b14510d1e7
Fixing some emitter issues with position.
2015-08-27 19:11:26 +01:00
photonstorm
9d1217ea21
Fixed the rnd calls.
2015-08-27 14:57:50 +01:00
photonstorm
ddcc46124c
RandomDataGenerator.float is a new alias for the method 'realInRange' and takes the same arguments.
2015-08-27 14:57:23 +01:00
photonstorm
9798864cc6
Emitter.emitParticle now has 4 new optional arguments: x
, y
, key
and frame
. These allow you to override whatever the Emitter default values may be and emit the particle from the given coordinates and with a new texture.
2015-08-27 14:48:52 +01:00
Paul
26a6338072
Change splice.call(arguments, ..) to use slice
...
- Bypasses issue of usage incorrectly omitting 2nd argument to `splice`
- More clear of intent; `slice` does not modifify `arguments`
- `slice` is faster across all desktop browsers, by varying degrees
- Probably due to parameter-aliasing and de-opts when modified.
- Both `slice` and `splice` create a new Array object
2015-08-26 23:50:16 -07:00
Richard Davey
bae732ca9e
Merge pull request #2027 from bsparks/dev
...
utilize the heal method
2015-08-26 23:38:40 +03:00
Richard Davey
a1bd35fc35
Tidied up formatting and improved jsdocs.
2015-08-26 19:13:46 +01:00
Richard Davey
b4a72b8747
Merge pull request #2025 from rwrountree/dev
...
Optimize the average function in math.js
2015-08-26 21:07:24 +03:00
Richard Davey
8b6d696316
jsdoc fix.
2015-08-26 03:59:18 +01:00
Ben Sparks
b7efb93698
utilize the heal method instead of just adding to health when reviving, so that maxHealth is respected
2015-08-25 14:42:02 -07:00
photonstorm
1e88bdda70
Loader.bitmapFont wouldn't automatically set the atlasURL
value if just the key was given.
2015-08-25 13:46:28 +01:00
Rusty Rountree
f017db806a
Phaser.Math.fuzzyCeil and Phaser.Math.fuzzyFloor should not return boolean values as stated in @return section of the comments
2015-08-25 04:06:06 -05:00
Rusty Rountree
92bac852c8
Optimize the average function in math.js
2015-08-25 02:16:31 -05:00
photonstorm
482d3c9882
Preparing for 2.4.4 dev.
2015-08-24 16:01:58 +01:00
photonstorm
486c15f16f
New docs.
2015-08-24 15:43:45 +01:00
photonstorm
bf862964d2
Phaser 2.4.3 Release.
2015-08-24 13:55:00 +01:00
photonstorm
94223c66b7
Updated blend mode multiply check ( #1994 )
2015-08-24 13:53:46 +01:00
photonstorm
cc7b632a37
Phaser.TilemapParser.INSERT_NULL is a new boolean that controls what happens when the parser encounters an empty tile: When scanning the Tiled map data the TilemapParser can either insert a null value (true) or a Phaser.Tile
instance with an index of -1 (false, the default). Depending on your game type depends how this should be configured. If you've a large sparsely populated map and the tile data doesn't need to change then setting this value to true
will help with memory consumption. However if your map is small, or you need to update the tiles (perhaps the map dynamically changes during the game) then leave the default value set (thanks #1982 )
2015-08-24 12:36:23 +01:00
photonstorm
0cce3f8287
Enabling a filter on a display object that had a blend mode set would cause the object to become invisible. The two cannot be combined, so when you set a filter on a display object it now automatically resets the blend mode to NORMAL
. The same does not happen in reverse however, so if you've got a filter set and then change the blend mode it will still break. Be careful to capture this yourself (thanks @wayfu #1994 )
2015-08-24 12:26:02 +01:00
photonstorm
5056eedb58
Optimised local vars to reduce file size.
...
Trying out null tile properties.
2015-08-24 12:03:32 +01:00
photonstorm
4ab5a07abf
jsdocs fix.
2015-08-24 12:03:03 +01:00
photonstorm
09f5742410
Tilemap.shuffle was calling the deprecated Phaser.Utils.shuffle, which has now moved to Phaser.ArrayUtils.shuffle.
2015-08-24 12:02:43 +01:00
photonstorm
bcedd921b7
Cache.addSpriteSheet didn't include default values for the frameMax
, margin
and spacing
arguments (thanks @vladkens #2017 #2018 )
2015-08-24 11:43:34 +01:00
photonstorm
845a14ff55
TilingSprite._renderCanvas wasn't correctly allowing for pixel rounding (thanks @ximop #2022
2015-08-24 11:38:59 +01:00
photonstorm
226b7070a8
Fixed issue with an extra 4px being added to the canvas elements because the display type wasn't set.
2015-08-24 11:32:32 +01:00
photonstorm
a5a503b02c
Phaser 2.4.3-RC1 build files.
2015-08-21 16:25:41 +01:00
photonstorm
5ffb5b558d
Tilemap.createFromObjects has been strengthened so that will only create Sprites for matching gids/ids/names. It also only sets the Sprite width and height values if they are present in the Tiled data (thanks @pparke #2012 )
2015-08-20 13:22:06 +01:00
photonstorm
22f7aacfcb
Added frameBased to the TweenManager and made Tween.frameBased reference that setting, allowing you to set it once ( #2015 )
2015-08-20 12:59:06 +01:00
photonstorm
a9354d4a3f
Added withinGame to Pointer Debug.
2015-08-20 12:48:09 +01:00
photonstorm
4fa1ffb4cf
JSDocs update.
2015-08-20 12:47:59 +01:00
photonstorm
99fbf35236
* Pointer.withinGame is no longer automatically set to 'false' in the Pointer.stop method - it will check if the Pointer actually is within the stage bounds and only set withinGame
to false if it's outside the bounds.
...
* MSPointer now has an `onPointerUpGlobal` handler for when the pointer is released outside of the canvas, but still within the browser window. This means that in IE11 a Sprites `onInputUp` event will now trigger even when outside the canvas (thanks @bvargish #2000 )
* MSPointer now has handles for the pointer being over and outside of the canvas element, which sets the Pointer.withinGame booleans accordingly. It also triggers the Mouse.mouseOutCallback and Mouse.mouseOverCallback callbacks respectively.
* The MSPointer event listeners have been renamed to all lower-case, i.e. 'pointerDown' is now 'pointerdown'.
2015-08-20 12:47:50 +01:00
photonstorm
55a7699381
Setting a P2.Body from Static or Kinematic to Dynamic will now automatically adjust the Body.mass to be 1 (thanks @wayfu #2005 )
2015-08-20 11:19:30 +01:00
Richard Davey
994a7dae73
jsdoc fix #2013
2015-08-19 22:19:55 +01:00
photonstorm
103c37cd42
BitmapData.drawFull draws the given Game Object or Group to a BitmapData and then recursively iterates through all of its children, including children of Game Objects and Groups. It can draw Text, BitmapText, Sprites, Images, Emitters and Graphics objects. It's perfectly valid to pass in game.world
as the parent object, and it will iterate through the entire display list.
2015-08-19 14:19:26 +01:00
photonstorm
176289f514
Video.stop now removes the 'playing' event listener, which stop Videos set to loop from throwing errors after being destroyed.
2015-08-18 16:04:10 +01:00
photonstorm
b1a05a6f52
BitmapText.font failed to pull the new font from the Phaser Cache, stopping it from updating properly (thanks @AbrahamAlcaina #2001 )
2015-08-18 13:48:08 +01:00
Vladislav Forsh
888f88ece8
Fixed js doc for cache.getRenderTexture
2015-08-11 20:31:31 +03:00
nickryall
57aaf23238
Fix for fullscreen retina
2015-08-09 20:32:04 +12:00
Richard Davey
7fbeb1c062
BitmapData.line draws a line to the BitmapData in the color and thickness specified.
...
Lots of BitmapData updates to use local vars and 'op' property, cutting down code size.
2015-08-07 02:48:00 +01:00
Richard Davey
fc8bff7b9e
jshint fix.
2015-08-07 01:41:59 +01:00
Richard Davey
7588e123c7
Line.centerOn will position the Line so that its midpoint lays on the coordinates given.
2015-08-07 01:40:37 +01:00
Richard Davey
614b84e2ea
* Line.rotateAround allows you to rotate a Line around the given coordinates (in world space)
...
* Point.rotate uses a faster and simpler rotation function when no distance argument is specified.
* Line.rotate used a calculation method which resulted in the line growing (or shrinking) in length over time, the more it was rotated. The new method never changes the lines length.
2015-08-07 01:35:31 +01:00
photonstorm
8e7b717a50
Line.midPoint will return a Point object where the x and y values correspond to the center (or midpoint) of the Line segment.
2015-08-06 17:10:39 +01:00
Richard Davey
62c87052cb
Merge pull request #1985 from yahiko00/master
...
Extra documentation and TypeScript definition file update
2015-08-06 14:20:26 +01:00
Yahiko Uzumaki
0416c6a9ee
Update BitmapData.js
...
Fix explanation.
2015-08-06 13:57:43 +02:00
yahiko
d412431947
Add extra information for the imageData property.
2015-08-06 13:49:51 +02:00
Brice Thomas
ef536d276a
doc(Signal): fix typo
2015-08-06 13:34:14 +02:00
photonstorm
9a0b6c24a4
Text can now accept undefined
or null
as the text
argument in the constructor and will cast it as an empty string.
2015-08-06 10:28:49 +01:00
Richard Davey
80540ea919
Added 'clear' argument to RenderTexture.render, which resolves the image build-up problem for cacheAsBitmap ( #1925 )
2015-08-06 01:01:58 +01:00
Richard Davey
7fc23c9abe
Text.setTextBounds didn't add the x and y values to the width and height offsets.
2015-08-04 23:06:07 +01:00
photonstorm
1fed360659
VideoStream.active = false is used if the browser supports it, otherwise it falls back to VideoStream.stop.
2015-08-04 15:48:43 +01:00
photonstorm
b365ebf570
jshint fix.
2015-08-03 16:45:03 +01:00
photonstorm
f4a1f11429
PIXI.CanvasPool is a new static global created to deal with the issue of resource leaks and continuous DOM node build-up when creating lots of Text or BitmapData objects, or when calling generateTexture
on any display object. The CanvasPool will do its best to re-use out dated canvas elements rather than filling up the DOM with new ones.
...
Sprite.setTexture has a new `destroyBase` parameter - set this to `true` if you know the base used a generated texture that isn't being used by any other sprites. This will free-up the canvas for further re-use by other calls to generateTexture or Text objects.
2015-08-03 16:09:16 +01:00
photonstorm
e901fb80f6
Merging in the CanvasPool changes to the core.
2015-08-03 14:46:55 +01:00
photonstorm
50516e3d34
Testing CanvasPool.
2015-08-03 14:33:12 +01:00
photonstorm
0493e19b8b
Group.cacheAsBitmap would be incorrectly offset in Canvas mode (thanks @mkristo #1925 )
2015-08-03 12:03:20 +01:00
photonstorm
4e857f19f6
BitmapText with tints applied wouldn't update properly in Canvas mode (thanks @Pajamaman #1969 )
2015-08-03 11:51:04 +01:00
photonstorm
98ae410c34
Removed use of the deprecated enterFullScreen
and leaveFullScreen
signals from the Scale Manager (thanks @mmanlod #1972 )
2015-08-03 11:44:00 +01:00
Richard Davey
9362a2b1f4
Text with tints applied wouldn't update properly in Canvas mode.
2015-07-31 19:09:49 +01:00
Richard Davey
4eb223f987
jsdocs fix.
2015-07-31 18:39:37 +01:00
Richard Davey
a56cd31638
jsdoc updates.
2015-07-31 18:39:37 +01:00
photonstorm
78fdb224ce
ArrayUtils.numberArrayStep would return an empty array if a single parameter was given, instead of a single step array (thanks @pooya72 #1958 )
2015-07-31 16:21:10 +01:00
Richard Davey
cbc68ab4c9
Merge pull request #1950 from jdnichollsc/dev
...
Added Text.addFontStyle and Text.addFontWeight
2015-07-31 16:00:47 +01:00
photonstorm
d23e5d6eba
BitmapText.smoothed is a new boolean property that allows you to set texture smoothing on a bitmap font or not. By default smoothing is always on, but you can turn it off which helps for bitmap fonts created from pixel art style character sets.
2015-07-31 15:58:00 +01:00
photonstorm
159f49d5bf
Experimenting with generateTexture fixes for Canvas.
2015-07-30 17:17:31 +01:00
Richard Davey
0bad5e4ab2
Merge pull request #1957 from bixi/temp
...
Fix p2 BodyDebug pixelsPerLengthUnit bug.
2015-07-30 17:15:48 +01:00
vrecluse
632c258d8d
Fix p2 BodyDebug pixelsPerLengthUnit bug.
...
When mpx doesn’t return default value, the debug body size and position
goes wrong.
2015-07-31 00:04:32 +08:00
photonstorm
fc83dc6bdf
Tween.frameBased allows you to control if a Tween updates based on the physics step (i.e. frame based) or the system clock (time based). A frame based tween will use the physics elapsed timer when updating. This means it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should be given in frames. If the Tween uses a time based update (which is the default) then the duration is given in milliseconds. In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween has actually been through.
2015-07-30 15:27:51 +01:00
photonstorm
c032d57183
Loader.images is a new method that allows you to pass an array of image keys, and optionally the urls, to the Loader and have them all added to the load queue in one go.
2015-07-30 15:01:52 +01:00
photonstorm
1393c8a98b
InputHandler.pointerOver would get stuck in an 'isOver' state if the Sprite changed its visibility during an onUp callback (thanks @Cristy94 #1955 )
2015-07-30 14:45:34 +01:00
photonstorm
a4321e56e3
* Pointer.isDown was reset before the Input.onUp event, meaning you couldn't get the Pointer.duration from within the event.
...
* Pointer.isDown was reset before the Input tap calculations, meaning onTap wouldn't dispatch (thanks @stovenator #1953 )
2015-07-30 14:08:26 +01:00
photonstorm
6139071ebc
Preparing for 2.4.3 dev.
2015-07-29 15:14:40 +01:00
photonstorm
4b22f48c75
2.4.2 release.
2015-07-29 15:01:04 +01:00
photonstorm
962066102c
Pointer fixes for Linux FireFox ( #1932 #1944 )
2015-07-28 14:18:36 +01:00
Juan David Nicholls Cardona
655013da1b
Added Text.addFontStyle and Text.addFontWeight allows you to set styles and weights font within the Text.
2015-07-28 02:05:08 -05:00
David Leonard
cbcc1a7bdb
Merge remote-tracking branch 'upstream/dev' into dev
2015-07-27 07:14:48 -07:00
David Leonard
2f634c6337
Minor fix to docstring
2015-07-27 07:12:17 -07:00
photonstorm
a8934c392d
Phaser.Sound will now automatically check the Cache to see if the audio file it is using is still there or not. If not then it will automatically called Sound.destroy
on itself. If you do not desire this result then you should ensure that you undertake all house-keeping yourself, and properly destroy Sound objects _before_ calling Cache.removeSound
( #1946 )
2015-07-27 14:02:04 +01:00
photonstorm
fd6c29e451
Pointer.move would accidentally reset the isDown
status of the Pointer on touch devices, which broke things like Sprite input events when built to native apps or run locally ( #1932 #1943 )
2015-07-27 13:34:06 +01:00
Richard Davey
1f73bbbe94
Device.canPlayVideo now checks for ogv
as a valid file extension for OGG video files (thanks @JB-Tellez #1928 )
2015-07-26 13:19:05 +01:00
Richard Davey
50480d815f
* Cache.getFrame has a new cache
parameter (that defaults to the Image cache, but can be changed to any other)
...
* Cache.getFrameCount has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.hasFrameData has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByIndex has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
* Cache.getFrameByName has a new `cache` parameter (that defaults to the Image cache, but can be changed to any other)
re: #1935
2015-07-26 13:14:25 +01:00
Richard Davey
2e12cd70ed
DeviceButton would try to set altKey
, shiftKey
and ctrlKey
even for Joypads (thanks @zatch #1939 )
2015-07-26 13:01:24 +01:00
Imanol Fernandez
e41dba7f0c
Fix unmatched context.save() & context.restore() calls
2015-07-24 17:36:56 +02:00
photonstorm
74a8ba0080
Preparing for 2.4.2 dev.
2015-07-24 14:04:30 +01:00
photonstorm
444e2cffe5
More tests with the UMD wrapper.
2015-07-24 13:21:33 +01:00
photonstorm
328fd32290
Cache.removeImage now calls destroy on the image BaseTexture, removing it from the PIXI global caches without throwing a warning.
2015-07-24 13:21:18 +01:00
Richard Davey
478d005f0b
Testing new UMD wrapper.
2015-07-24 09:43:44 +01:00
Richard Davey
aeda044143
Safari on OSX wouldn't recognise button presses on trackpads (thanks JakeCake)
2015-07-23 20:54:59 +01:00
photonstorm
7a6de818e1
Updated Grunt build scripts so that all third party libs (such as Creature, P2, gl-matrix and PIXI) are now kept well and truly outside of Phaser. They are defined and placed first in the build files. So no more PIXI hiding within the Phaser namespace or UMD patching for Phaser required.
2015-07-23 16:00:45 +01:00
photonstorm
9a83ddcab9
Updated to latest Creature runtimes, added to GameObjectFactory.
2015-07-23 13:25:08 +01:00
jamesgroat
10587e07ee
Use _cacheMap to map from constant to _cache.
2015-07-22 16:53:07 -07:00
Richard Davey
1e6f83dbd3
Preparing for 2.4.1 development.
2015-07-22 17:26:12 +01:00
photonstorm
858ad51610
Phaser 2.4 release.
2015-07-22 15:31:30 +01:00
photonstorm
ffaa7d711f
Removed BaseTextureCache requirement from BitmapData.
...
Fixed jshint.
Updated TS defs.
2015-07-22 13:23:40 +01:00
photonstorm
8eb34f96ce
WebGL context loss and restoration is now handled directly by Phaser.
...
Cache.clearGLTextures empties out all of the GL Textures from Images stored in the cache. This is called automatically when the WebGL context is lost and then restored.
2015-07-22 12:59:32 +01:00
photonstorm
915a757f96
Text.updateText will now check the width and height values of the Text canvas and if either are zero it sets Text.renderable = false
to avoid throwing WebGL texture binding errors.
2015-07-22 12:43:43 +01:00
photonstorm
f28bc82fe3
Fixed packfiles undefined path error.
2015-07-22 10:53:15 +01:00
photonstorm
f15fe6706c
All undefined argument checks were changed from if (typeof x === 'undefined')
to if (x === undefined)
removing the typeof check and saving some bytes across the codebase in the process.
2015-07-22 10:37:15 +01:00
Richard Davey
9e38bf974a
World.stateChange is a new method that is called whenever the state changes or restarts. It resets the world x/y coordinates back to zero and then resets the Camera.
...
Sprites with Arcade Physics bodies that had `collideWorldBounds` enabled would be moved to the wrong position if you restarted a State (or swapped to a new State) that reset the world bounds (thanks @vulvulune #1775 )
2015-07-22 01:24:26 +01:00
Richard Davey
356864ff8a
TweenData.update now uses the Time.elapsedMS
value for its delta calculation, instead of the physicsStep - this is because tweens are inherently time duration based and on a lagging system they were not properly completing when they should do (also addresses #1819 )
2015-07-22 00:09:06 +01:00
Richard Davey
b906463189
Internally the Time class has been updated to split out the RAF and SetTimeout implementations. This cuts down the update loop workload significantly, which was causing a performance optimization bottleneck in V8.
2015-07-21 21:41:26 +01:00
Richard Davey
fc1e0de790
Merge pull request #1923 from mkristo/pixi-patch
...
Make PIXI available for Phaser when using require
2015-07-21 16:14:09 +01:00
photonstorm
ee59425be3
RC3
2015-07-21 15:19:26 +01:00
Richard Davey
c6534a56b6
Merge pull request #1922 from mkristo/process-patch
...
Fix reference error for process
2015-07-21 14:21:12 +01:00
photonstorm
7144b10ad5
TileSprites fixed for WebGL.
2015-07-21 13:24:12 +01:00
Markus Kristo
da6d7a58e3
Fix reference error for process
...
process was defined, while window.process wasn't.
2015-07-21 13:53:18 +02:00
Markus Kristo
17c0768521
Add PIXI to the Phaser namespace
...
Hackish solution to make it possible to access PIXI directly from a game.
2015-07-21 11:00:30 +02:00
Markus Kristo
6d742155bf
Make sure PIXI is available when using require for phaser builds
...
This is a hackish solution, and would not be needed if Phaser used require and a JS bundler like webpack
2015-07-21 10:55:54 +02:00
photonstorm
92486f85d9
Removed console.log.
2015-07-20 14:01:45 +01:00
photonstorm
cf74eaa396
MSPointer now checks the pointerType
property of the DOM event and if it matches 'mouse' it will update Input.mousePointer
, rather than Input.pointer1
(or whatever the next free Pointer was).
2015-07-20 14:01:21 +01:00
photonstorm
7ffbeb8a2a
Added Mouse consts back in ( #1903 )
2015-07-20 12:38:41 +01:00
photonstorm
bb6c5bbbdc
Key added to TextureAtlas and SpriteSheet, fixing the 'undefined' key error in LoadTexture.
2015-07-20 12:00:37 +01:00
photonstorm
b6ad27ed24
Phaser 2.4 RC2.
2015-07-17 17:51:05 +01:00
photonstorm
b470601faf
Tidying up docs.
2015-07-17 17:50:53 +01:00
photonstorm
c2812a7b5c
jshint fixes and renamed float to padFloat.
2015-07-17 14:11:11 +01:00
photonstorm
5d0788b47d
Consolidated all Pointer buttons into the new DeviceButton class.
2015-07-17 13:52:09 +01:00
photonstorm
32ea5bee03
Fixes #1916 - but am now working on the DeviceButton class to tidy it all up.
2015-07-17 12:24:08 +01:00
photonstorm
45944d689c
Fix for #1914
2015-07-16 22:45:25 +01:00
Richard Davey
6531552b32
Merge pull request #1905 from standardgaussian/aabbninja
...
AABB vs. AABB collision in Ninja
2015-07-16 15:45:09 +01:00
Richard Davey
2d3b1ee383
Merge pull request #1911 from mthurlin/patch-1
...
game.make.group() did not setup parent correctly
2015-07-16 15:40:10 +01:00
Richard Davey
fcaa6cec68
Merge pull request #1912 from Feenposhleen/feature/fixing-json-fonts
...
Improving JSON BitmapText implementation
2015-07-16 15:37:09 +01:00
photonstorm
7271eb5e2d
Removed un-needed cache arguments and fixed jshint error.
2015-07-16 14:58:51 +01:00
Charlo
795a7c80a8
Improving JSON BitmapText implementation
2015-07-16 13:30:55 +02:00
Richard Davey
f552615982
Fixed RenderTexture in WebGL.
2015-07-16 02:27:07 +01:00
Richard Davey
9c588d94e8
PIXI.BitmapText has been removed as a global array, as it is no longer used.
2015-07-16 01:29:32 +01:00
Richard Davey
9314c5a767
LoaderParser.bitmapFont, xmlBitmapFont and jsonBitmapFont all now return the font data rather than write it to the now deprecated PIXI global font cache.
2015-07-16 01:17:03 +01:00
Richard Davey
3c7293ab57
Updated AnimationParser and fixed LoadTexture calls.
2015-07-16 01:02:59 +01:00
Richard Davey
bab50d7c88
* The Cache has been internally refactored considerably. Image data is now all stored in the same object, rather than being split across the PIXI global caches (such as PIXI.TextureCache and PIXI.BaseTextureCache), which are no longer used by Phaser.
...
* Internally the Cache now uses a single _cache object, which is partitioned to store the various different object types. Before the cache used lots of private objects, one per data type, but it's now a lot cleaner and we've managed to cut out hundreds of lines of duplicate code in the process.
* Cache.getImage has a new argument which lets you return either just the HTML Image element or the entire image cache object, which includes the baseTexture and frame data.
* Cache.getImage will return a __default image if the key isn't given, or a __missing image if the key is given but not found in the cache. This means it will always return a valid image and no longer cause Phaser to throw runtime errors deeper down with invalid image objects.
2015-07-16 00:46:28 +01:00
Richard Davey
5e33a2ea92
TS defs updates for the Cache changes.
2015-07-15 23:22:51 +01:00
Richard Davey
6921b30d94
The Loader can now load external fragment shaders (.frag files)
2015-07-15 23:22:25 +01:00
Richard Davey
1c9fb614a4
PIXI._CompileShader can now take an array or a string for the fragment src.
2015-07-15 23:20:39 +01:00
Richard Davey
1f66cdbcb5
Lots of jsdoc updates and small fixes.
2015-07-15 21:52:19 +01:00
photonstorm
f52b553eaf
Loads more Cache optimisations and tweaks.
2015-07-15 17:06:29 +01:00
photonstorm
81b553d8ee
Ok let's start removing these 'typeof' checks.
2015-07-15 16:33:26 +01:00
photonstorm
d663d290c2
hasFrameData added and some LoadTexture updates.
2015-07-15 16:33:01 +01:00
photonstorm
8dd3e06747
Loads of Cache optimisations and updates.
2015-07-15 15:00:21 +01:00
Markus Thurlin
d360384f4a
game.make.group() did not setup parent correctly
2015-07-15 14:30:28 +02:00
photonstorm
f41f806b99
Fixed issue with looped animations skipping last frame (or getting stuck on a single frame in 2 frame anims)
2015-07-14 13:47:25 +01:00
photonstorm
a0d57544c7
P2 updates finished.
2015-07-13 14:48:33 +01:00
photonstorm
956fa493a6
The P2.Body.onBeginContact arguments have changed. It now sends 5 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A, the p2 Shape from Body B and the contact equations array. Note that the Phaser.P2.Body may be null if you collide with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.
...
The P2.Body.onEndContact arguments have changed. It now sends 4 arguments: The Phaser.P2.Body, the p2.Body, the p2 Shape from Body A and the p2 Shape from Body B. Note that the Phaser.P2.Body may be null if this is the end of a contact with a 'native' p2 body (such as the world bounds). However the p2.Body argument will always be populated.
Upgraded to p2.js 0.7.0
2015-07-13 11:44:04 +01:00
Richard Davey
502dd548fb
Loader.path is a string and if set it is placed before any _relative_ file path given to the Loader. For example: load.path = "images/sprites/";
followed by load.image("ball", "ball.png");
and load.image("tree", "level1/oaktree.png");
would load the ball
file from images/sprites/ball.png
and the tree from images/sprites/level1/oaktree.png
. The path is added before the filename but *after* the Loader.baseURL
. The path _must_ end with a "/". Set it to nothing to disable the path.
2015-07-12 23:43:35 +01:00
Richard Davey
8b165b9225
Reduce booleans.
2015-07-12 16:19:23 +01:00
Richard Davey
44c650f6e7
PIXI.DisplayObject.updateTransform now nulls the _currentBounds property (thanks @gaufqwi #1906 )
2015-07-12 12:01:38 +01:00
Richard Davey
41d702b485
Pointer.isUp and isDown are now set in the updateButtons method based on the state of ANY button on the device, jsdocs also updated to reflect this ( #1902 )
2015-07-12 11:56:25 +01:00
Richard Davey
b0a8d3d78c
Mouse.button and MSPointer.button properties removed and jsdocs expanded to explain the correct path to now take ( #1903 )
2015-07-12 11:47:20 +01:00
Richard Davey
4dec046c40
Added pendingDestroy to Groups.
2015-07-12 11:33:30 +01:00
Standard Gaussian
b8710d7066
Removed unused local variables in Ninja.AABB.reportCollisionVsBody
2015-07-11 21:28:15 +01:00
Standard Gaussian
e7356e003f
Implemented Ninja AABB vs AABB collisions
2015-07-11 21:04:16 +01:00
Richard Davey
1850e287bd
Merge pull request #1899 from spayton/updev
...
Removed use of deprecated signals (enterLandscape & enterPortrait)
2015-07-10 17:09:35 +01:00
photonstorm
d3525950a2
Group.addMultiple if given a Group.children array as the first parameter would fail as the original group length was decreased out of line with the children being added. Group.addMultiple now checks if the children argument is a Phaser.Group instance, and if so it uses Group.moveAll instead on it (thanks @AnderbergE #1898 )
...
Group.moveAll allows you to move all of the children of a Group into another Group.
2015-07-10 17:05:54 +01:00
spayton
37e0efefe3
Removed use of deprecated signals (enterLandscape & enterPortrait)
2015-07-10 14:42:17 +01:00
Richard Davey
8e92c13412
Canvas.setSmoothingEnabled only applies the value of the property exists, which avoids the Chrome webkit prefix deprecation warnings.
2015-07-10 04:02:21 +01:00
Richard Davey
f65bca1026
All Signals now have the ability to carry extra custom arguments with them, which are passed on to the callback you define after any internal arguments. For example a Phaser.Key has an onDown signal. When dispatched onDown sends a reference to the Key as the first and only argument. But you can now set the callback like this: fireKey.onDown.add(shoot, this, 0, 'lazer', 64)
. So when the onDown signal is dispatched internally the callback (shoot
in this case) will receive 3 arguments: the Key reference that is raised internally and the string 'lazer' and value 64, which were the custom arguments provided when setting-up the callback.
2015-07-09 21:15:00 +01:00
Richard Davey
03e2f1a2b5
On trackpads Pointer.updateButtons now checks for the ctrlKey being pressed and sets rightButton to true as a result.
2015-07-09 19:26:00 +01:00
photonstorm
45f06bd01c
Fixed #1866
2015-07-09 16:41:53 +01:00
photonstorm
5f611f83cb
Fixed small texture bug.
2015-07-09 15:51:24 +01:00
photonstorm
8cf300fc11
Added Japanese Machine palette.
2015-07-09 14:29:18 +01:00
photonstorm
89c87bc9db
Updated addKeys to take an object instead of 2 arrays - it's just cleaner and reads easier in code.
2015-07-09 14:28:58 +01:00
photonstorm
630886da28
Reverting Windows Phone WebGL - Canvas force #1706
2015-07-09 11:51:27 +01:00
photonstorm
5ad3698703
BitmapData.clear has 4 new optional parameters: x, y, width and height, that define the area to be cleared. If left undefined it works exactly the same as before and clears the entire canvas.
2015-07-09 11:44:21 +01:00
Richard Davey
0dc8757781
Updates.
2015-07-09 01:30:03 +01:00
Richard Davey
6a8e6a7954
Adding in Phaser.Create.
2015-07-09 00:19:21 +01:00
Richard Davey
d027bf8ba7
BitmapData.generateTexture will take a snapshot of the BitmapDatas canvas at that moment in time and convert it into an Image, which is then stored in the Phaser image Cache based on the key given. You can then use the new texture for any future sprites or texture based objects.
2015-07-09 00:19:07 +01:00
Richard Davey
7253ac368d
jsdoc update.
2015-07-08 19:11:41 +01:00
Richard Davey
3590272c51
All Game Objects have a new boolean property called pendingDestroy
. If you set this to true
then the object will automatically destroy itself in the *next* logic update, rather than immediately. This is useful for cases when you wish to destroy an object from within one of its own callbacks, such as with buttons or other input events (thanks @alamboley #1748 )
2015-07-08 18:52:01 +01:00
photonstorm
1b5da312d0
RandomDataGenerator.weightedPick has been tweaked slightly to allow for a more even distribution of weights. It still favors the earlier array elements, but will accurately include 'distance' elements as well (thanks @gingerbeardman #1751 )
2015-07-08 17:20:36 +01:00
photonstorm
87ac0b8f50
jsdoc tweak.
2015-07-08 16:40:40 +01:00
photonstorm
64b1794d67
Rope.segments used the wrong vertices property, causing a runtime error.
...
Debug.ropeSegments didn't take the scale of the Rope object into consideration, causing incorrect debug rendering.
2015-07-08 16:40:26 +01:00
photonstorm
47e1d16a6d
jshint fix.
2015-07-08 16:00:03 +01:00
photonstorm
b9dcf74726
If the device is detected as a Windows Phone the renderer is automatically set to use Canvas, even if WebGL or AUTO was requested (thanks @ramarro123 #1706 )
2015-07-08 15:25:52 +01:00
photonstorm
0f31358724
Device.windowsPhone should now correctly identify Windows Phone 8.1 devices, which also think they are iOS and Androids. If you find a device that gets around this check please send us its ua string! (thanks @jounii #1496 )
2015-07-08 15:22:32 +01:00
photonstorm
f48d038db3
Lots of jsdoc updates ( #1644 )
2015-07-08 15:10:41 +01:00
photonstorm
1281bc52d7
Setting the scaleMode property of a Game configuration object would cause a ScaleManager TypeError in the resize method. It now stores the scale mode locally and applies it after boot (thanks @Mickawesomesque #1534 )
2015-07-08 14:52:20 +01:00
photonstorm
3012e49937
Text.addColor would incorrectly color the text stroke if set (thanks @llevkin #1893
...
Text.addStrokeColor works in the same way as `Text.addColor` but allows you to define a color stop for the stroke color instead of the fill color.
2015-07-08 12:52:39 +01:00
Richard Davey
86cac2085c
BitmapData.move(x, y) allows you to shift the contents of the BitmapData horizontally and vertically by the given amounts. The image wraps-around the edges of the BitmapData.
...
BitmapData.moveH(distance) allows you to horizontally shift the BitmapData with wrap-around the edges.
BitmapData.moveV(distance) allows you to vertically shift the BitmapData with wrap-around the edges.
2015-07-08 04:26:28 +01:00
Richard Davey
a7e18137d1
Text has a new style property: tabs. This allows you to specify a pixel value (or values) that allows you to space out text that contains tab characters within it. Text.tabs
can be either an integer, in which case all tabs share the same spacing, or an array of pixel values corresponding exactly to the number of tabs per line of text. This allows you to easily align columns of data in a single Text object.
2015-07-08 01:15:31 +01:00
Richard Davey
3066f60f11
parseList support added.
2015-07-08 00:03:03 +01:00
Richard Davey
2e447ec01d
Tidied up tab handling a little.
2015-07-07 23:41:37 +01:00
Richard Davey
ae08b9ac02
Text tab support working. Now to add varying tab sizing.
2015-07-07 23:31:44 +01:00
Richard Davey
b8cc4d9d53
Updated Text resolution handling.
2015-07-07 20:48:00 +01:00
photonstorm
a19479d948
jsdocs update.
2015-07-07 16:58:41 +01:00
photonstorm
157df30696
Pointer button handling has been given an overhaul. It has the following new boolean properties: leftButton
, rightButton
, middleButton
, backButton
, forwardButton
and eraserButton
. So you can now easily check which buttons are active and build right or middle click support into your games. The Pointer object normalises these properties for you, regardless if they came from a MouseEvent or PointerEvent (thanks @youssefdetovernickr for the idea #1848 )
2015-07-07 16:53:56 +01:00
photonstorm
9548fb9856
Final textBounds updates.
2015-07-07 15:16:23 +01:00
Richard Davey
92f2742a26
When reusing a Tween created with an array of properties the values would get exponentially added to the TweenData internal array each time the tween was re-run (thanks @SBCGames #1747 )
2015-07-07 04:21:55 +01:00
Richard Davey
6a9fd4de8d
Debug.currentAlpha wasn't being used to set the alpha of the Debug context at all (was always set to 1) but now updates the alpha of the Debug context before anything is rendered to it (thanks @wayfu #1888 )
2015-07-07 03:32:11 +01:00
Richard Davey
06658fa1e0
TilemapLayer.resize allows you to resize a TilemapLayer. It will update the internal canvas object and corresponding texture dimensions ( #1881 )
2015-07-07 03:27:28 +01:00
Richard Davey
8aaa8de985
Fixed issue with tilesets not updating correctly.
2015-07-07 02:38:14 +01:00
Richard Davey
a1f618f54f
Debugging tileset issue.
2015-07-07 02:18:53 +01:00
Richard Davey
f57d3c19e9
P2.Body.createGroupCallback incorrectly referenced the _groupCallbackContext
when deleting it (thanks @Langerz82 #1886 )
2015-07-07 01:24:26 +01:00
Standard Gaussian
a556dfdc69
Issue #1885 : P2.enableBody now checks if an anchor exists on target object before attempting to set its value
2015-07-05 22:39:15 +01:00
photonstorm
8919e4e128
Trying out resize method.
2015-07-02 17:19:57 +01:00
photonstorm
ab092c5c14
Keyboard.addKeys is a practical way to create an object containing user selected hotkeys. For example: addKeys( [Phaser.Keyboard.W, Phaser.Keyboard.S, Phaser.Keyboard.A, Phaser.Keyboard.D], [ 'up', 'down', 'left', 'right' ] );
would return an object containing the properties up
, down
, left
and right
that you could poll just like a Phaser.Key object. (thanks @Mourtz #1857 )
2015-07-02 14:15:06 +01:00
Richard Davey
755a247e31
Merge pull request #1857 from Mourtz/master
...
Implemented Keyboard.AddKeys function.
2015-07-02 13:54:18 +01:00
photonstorm
698167a596
Tiled Image Collection support is now available and has been added to the TilemapParser and Tilemap classes (thanks @asyed94 #1879 )
2015-07-02 13:53:02 +01:00
Richard Davey
1f76340563
Merge pull request #1879 from asyed94/dev
...
Implemented Tiled Image Collection support.
2015-07-02 13:43:06 +01:00
photonstorm
a89d48b9a6
Text.autoRound allows you to control if the text is allowed to render at sub-pixel coordinates or not. Set to true
to round the coordinates, often eliminating anti-aliasing from certain font types ( #1867 )
2015-07-02 13:39:59 +01:00
photonstorm
ce405acb02
jsdoc update #1864
2015-07-02 13:31:26 +01:00
photonstorm
29f9eeabc6
RenderTexture now takes the display objects alpha into consideration when rendering it, before it would always reset worldAlpha to 1 before rendering, thus ignoring any alpha that may be set.
2015-07-02 13:28:44 +01:00
Richard Davey
2b7666e22d
Added toString to the constructor parameter.
2015-07-01 23:37:48 +01:00
asyed94
6771c656e9
Removed trailing whitespace.
2015-06-29 16:32:16 -05:00
asyed94
8fefabcf59
Implemented Tiled Image Collection support.
...
Created class ImageCollection.js to internally handle Image Collection
data.
Added imagecollections member to Tilemap.js to access parsed Image
Collection data.
Added ability to parse Image Collections from Tiled json data to
TilemapParser.js
2015-06-27 15:30:26 -05:00
photonstorm
8356aacaa8
Trying out new Text pivot and mute handling.
2015-06-24 19:57:40 +01:00
photonstorm
1ed33cb06c
Setting mute to false on Sound that was never muted caused its volume to be set to zero (thanks @brianbunch #1870 )
2015-06-24 15:54:25 +01:00
Richard Davey
5f2b2df3d4
Yuma :)
2015-06-22 00:31:54 +01:00
photonstorm
a69c156526
The Text Bounds is a rectangular region that allows you to align your text within it, regardless of the number of lines of text or position within the world. For example in an 800x600 sized game if you set the textBounds to be 0,0,800,600 and text alignment to 'left' and vertical alignment to 'bottom' then the text will render in the bottom-right hand corner of the game, regardless of the size of font you're using or the number of lines in the text itself.
...
Set the Style properties `boundsAlignH` and `boundsAlignV` or adjust them via the Text setters to change the alignment.
It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts have additional padding around them which you can mitigate by tweaking the Text.padding property.
Setting a textBounds _doesn't_ update the wordWrapWidth, so be aware of the relationship between the two.
Call this method with nothing defined for any of the parameters to reset an existing textBounds.
#1824
2015-06-17 17:18:04 +01:00
photonstorm
0258245f12
Phaser.Text no longer extends PIXI.Text but replaces it entirely. Phaser.Text now natively extends a Phaser Sprite, meaning it can be enabled for physics, damaged, etc.
2015-06-17 13:21:28 +01:00
photonstorm
102c74e121
Deprecated the following:
...
* Camera.screenView
* ScaleManager.maxIterations
* ScaleManager.enterPortrait (see onOrientationChange)
* ScaleManager.enterLandscape (see onOrientationChange)
* ScaleManager.enterFullScreen (see onFullScreenChange)
* ScaleManager.leaveFullScreen (see onFullScreenChange)
* ScaleManager.fullScreenFailed (see onFullScreenError)
* ScaleManager.checkResize
* ScaleManager.checkOrientation
* ScaleManager.setScreenSize (see updateLayout)
* ScaleManager.setSize (see reflowCanvas)
* ScaleManager.checkOrientationState (see reflowCanvas)
* ScaleManager.orientation (see screenOrientation)
* Gamepad.disabled (see enabled)
* Input.currentPointers (see totalActivePointers)
* Input.disabled (see enabled)
* Keyboard.disabled (see enabled)
* Mouse.disabled (see enabled)
* Mouse.mouseMoveCallback (see Input.addMoveCallback)
* MSPointer.disabled (see enabled)
* Touch.disabled (see enabled)
* Cache.getUrl (see getURL)
* Math.truncate (see Math.trunc)
* Math.snapToInArray (see Phaser.ArrayUtils.findClosest)
* Math.interpolateFloat (see Math.linear)
* Math.normalizeLatitude (use Phaser.Math.clamp(lat, -90, 90))
* Math.normalizeLongitude (use Phaser.Math.wrap(lng, -180, 180))
* Math.chanceRoll (use Phaser.Utils.chanceRoll)
* Math.numberArray (use Phaser.ArrayUtils.numberArray)
* Math.numberArrayStep (use Phaser.ArrayUtils.numberArrayStep)
* Math.limitValue (use Phaser.Math.clamp)
* Math.randomSign (use Phaser.Utils.randomChoice(-1, 1))
* Math.angleLimit (use Phaser.Math.clamp)
* Math.getRandom (use Phaser.ArrayUtils.getRandomItem)
* Math.removeRandom (use Phaser.ArrayUtils.removeRandomItem)
* Math.floor (use Math.trunc)
* Math.ceil (use Phaser.Math.roundAwayFromZero)
* Math.shift (use Phaser.ArrayUtils.rotate)
* Math.shuffleArray (use Phaser.ArrayUtils.shuffle)
* Math.distanceRounded (do the rounding locally)
* Canvas.getOffset (see Phaser.DOM.getOffset)
* Canvas.getAspectRatio (see Phaser.DOM.getAspectRatio)
* TilemapLayer.tileColor (use TilemapLayer.debugSettings.missingImageFill)
* Phaser.ArrayList alias removed, now use Phaser.ArraySet
* Utils.transposeArray (see Phaser.ArrayUtils.transposeMatrix)
* Utils.rotateArray (see Phaser.ArrayUtils.rotateMatrix)
* Utils.shuffle (see Phaser.ArrayUtils.shuffle)
2015-06-17 03:14:31 +01:00
photonstorm
8cf28fede7
maxHealth is a new property that Game Objects with the Health component receive and works in combination with the heal
method to ensure a health limit cap.
2015-06-17 02:00:04 +01:00
photonstorm
b725c25702
Button game objects now have Input.useHandCursor
set to true
by default.
2015-06-17 01:55:36 +01:00
Richard Davey
0b82a68717
Merge pull request #1794 from stephandesouza/patch-1
...
Add a Heal Method to Phaser.Components.Health
2015-06-17 01:54:14 +01:00
Richard Davey
a7a74550a5
Merge pull request #1837 from Feenposhleen/dev
...
JSON support for BitmapFont atlases
2015-06-17 01:49:23 +01:00
Richard Davey
560f98b40b
Merge pull request #1828 from luckylooke/patch-2
...
docs: parameter description augmented
2015-06-17 01:41:25 +01:00
Richard Davey
306fbf4d5c
Merge pull request #1810 from Preece/tilemap-overlap
...
Sprite vs Tilemap can now check for overlap, without trying to separate
2015-06-17 01:38:42 +01:00
Richard Davey
88524cd1ce
Merge pull request #1851 from rblopes/detect-nwjs-electro
...
Changes for nw.js-like environment detection code
2015-06-17 01:35:16 +01:00
photonstorm
40802314dd
TileSprite now fully supports animation again, having been broken for several versions due to a Pixi upgrade. We've updated the way TileSprites generate their textures internally considerably and animation support is back across both Canvas and WebGL as a result ( #1653 )
2015-06-17 01:25:56 +01:00
photonstorm
04a25c5d9b
Small fix + jsdoc update.
2015-06-17 01:04:55 +01:00
Richard Davey
14733e9b90
Tilemap.addTilesetImage can now accept a BitmapData as the key
parameter and will use the BitmapData to render the tileset with instead of an image from the cache (thanks to @unstoppablecarl for the idea #1838 )
2015-06-16 23:17:46 +01:00
photonstorm
30a35227da
Formatting update.
2015-06-16 20:38:18 +01:00
photonstorm
71cf2064ab
Fixed TS defs and jsdoc for Ninja convertTilemap #1756
2015-06-16 19:10:01 +01:00
photonstorm
17831e0103
P2.Body.loadPolygon now allows the key
parameter to be passed as null
- when this happens the object
parameter can be the actual physics object data instead of a string pointing to the cache, allowing you to take advantage of adding multiple convex shapes with automatic adjustments for center of mass #1801
2015-06-16 19:02:28 +01:00
photonstorm
cf83f51315
Added textureDebug boolean - allows you to visually debug the generated texture a TilingSprite creates.
2015-06-16 18:31:39 +01:00
photonstorm
58f4b07741
Clarified relationship between Sprite and BodyDebug #1795
2015-06-16 18:30:54 +01:00
photonstorm
b481402ae4
Due to a Pixi 2 issue TileSprite when running under WebGL didn't respect the world alpha setting and would only work with its own alpha (thanks @hanenbro #1774 )
2015-06-16 17:03:19 +01:00
Richard Davey
8a750a1f1e
Merge pull request #1777 from boniatillo-com/assetpack_audiosprite
...
Load audiosprite from asset pack
2015-06-16 16:43:06 +01:00
photonstorm
89c11b9d48
TilemapLayer swapped to use full Phaser.Sprite to allow for input events, bringToTop, etc.
2015-06-16 16:40:45 +01:00
photonstorm
1990bce48b
Sound.restart and Sound.stop now properly disconnect the sound from the gainNode (or external node) before stopping it, allowing restart to work correctly (thanks @eofs #1796 )
2015-06-16 16:24:47 +01:00
photonstorm
00cf44eb22
If running under Cordova and iOS the Game.lockRender boolean will be set to true
when the game pauses and false
when it resumes. This avoids the gpus_ReturnNotPermittedKillClient
app crash on iOS (thanks @cncolder #1800 )
2015-06-16 14:54:42 +01:00
photonstorm
ab8c98676e
Sound.resume wouldn't properly restart looped sounds in Chrome after being paused. Phaser now specifically handles the Chrome 42 bug and later fix (thanks @nkovacs #1820 )
2015-06-16 14:28:46 +01:00
photonstorm
c518fa32b7
Formatting.
2015-06-16 14:16:04 +01:00
photonstorm
c0c3fef420
jsdocs update.
2015-06-16 14:16:04 +01:00
photonstorm
f5369628ce
Device.chromeVersion will return the major version number of Chrome.
2015-06-16 14:16:04 +01:00
photonstorm
d931cedb69
Fixed issue with long text dropping to be shorter again.
2015-06-16 12:45:26 +01:00
photonstorm
697a3f4f18
jsdoc tweak.
2015-06-16 11:57:28 +01:00
Alex Mourtziapis
7252666e9a
fixed minor jshint warnings.
2015-06-15 04:35:06 +03:00
Alex Mourtziapis
9d16e3e9a0
Update Keyboard.js
2015-06-15 04:33:40 +03:00
Alex Mourtziapis
4cc3777d36
Fixed some Travis CI errors.
2015-06-15 00:41:37 +03:00
Alex Mourtziapis
565d8e6e4a
Implemented Keyboard.AddKeys function.
2015-06-14 23:35:38 +03:00
photonstorm
732b80813e
Line.rotate allows you to rotate a line by the given amount around its center point.
2015-06-13 05:20:43 +01:00
photonstorm
5f9bff0e8b
Clarified the documentation for Point.rotate and fixed all the examples.
2015-06-13 05:02:07 +01:00
photonstorm
9e78cd1d7a
Rectangle.random will return a uniformly distributed random point from anywhere within the rectangle.
2015-06-13 04:18:50 +01:00
photonstorm
77e7b2af9b
Ellipse.random will return a uniformly distributed random point from anywhere within the ellipse.
2015-06-13 03:46:20 +01:00
photonstorm
3daea179fb
Line.random will return a random point from anywhere on the Line segment.
2015-06-13 03:04:02 +01:00
photonstorm
70cf7a32bc
Fixed jshint errors.
2015-06-13 02:31:21 +01:00
photonstorm
8de9e0c076
Fixed loadEvent argument.
2015-06-13 02:30:00 +01:00
photonstorm
f216313582
jsdoc and debug removal.
2015-06-12 19:21:06 +01:00
photonstorm
fa469b85e1
Added GameObjectFactory.video url parameter.
2015-06-12 19:20:50 +01:00
photonstorm
7d308a2169
Added loadEvent parameter to Loader.video.
2015-06-12 19:19:43 +01:00
Rafael Barbosa Lopes
b64d817913
Refactoring the boolean expressions.
2015-06-12 15:17:26 -03:00
photonstorm
9212c01dae
Returns a random point from anywhere within this circle.
2015-06-12 19:15:56 +01:00
Rafael Barbosa Lopes
3f5691ecdd
Add detection for GitHub Electron.
2015-06-12 15:08:54 -03:00
Rafael Barbosa Lopes
bf9d516ef4
Simplify detection of nw.js (formerly Node-WebKit).
2015-06-12 15:06:22 -03:00
photonstorm
af42f5d4c9
Cache.getJSON has a new parameter: clone
. If set it will return a clone of the object stored in the Cache rather than a reference to it.
2015-06-12 12:16:58 +01:00
photonstorm
0b6bf3f52f
Extended getUserMedia check.
2015-06-11 06:01:40 +01:00
photonstorm
681d8679e7
Rectangle.resize allows you to resize a Rectangle to the new given dimensions without altering its position.
2015-06-11 06:01:29 +01:00
photonstorm
10a3df1ef5
Set the Video baseTexture to __default until the stream starts.
2015-06-10 14:21:58 +01:00
photonstorm
5458097006
Renamed createVideoStream to startMediaStream.
...
Refactored Video constructor significantly - you can no longer create a webcam stream from the constructor, as it doesn't give you time to respond to onAccess and onError signals in Firefox. Instead call startMediaStream directly having set-up your signal listeners first.
startMediaStream now has a chance to dispatch the onError signal if the webcam has been blocked entirely by the browser (auto-block or remembered block). autoPlay attribute removed to stop Firefox throwing a "Invalid URI. Load of media resource failed" error.
Tidied up Video.destroy to properly remove video element from the DOM.
2015-06-10 00:59:24 +01:00
photonstorm
1c1a2ac195
Volume should default to 1 if undefined OR null (as from an Audio Sprite)
2015-06-09 20:55:20 +01:00
photonstorm
5c6eab86c0
Swapped to the shorter 'between' method.
2015-06-09 20:54:52 +01:00
nextht
6f5d4b93b8
Fix mask combine filter bug
...
In the demo (code below), i create a group with a rect mask, and create a sprite as child with a blurXY filter, then nothing is displayed.
So i hack WebGLFilterManager's pushFilter and popFilter method, in pushFilter method i create a new stencilManager instance and cache the old one, in popFilter i destroy the new stencilManager and restore the old one, then this workaround works rightly as i expect.
I think this is bug for PIXI, so i hope @GoodBoyDigital and @photonstorm can help me to check whether this fixing is right or not, thanks.
var game = new Phaser.Game(800, 600, Phaser.WEBGL, 'phaser-example', { preload: preload, create: create });
function preload() {
game.load.image('phaser', 'assets/sprites/phaser2.png');
game.load.script('filterX', '../filters/BlurX.js');
game.load.script('filterY', '../filters/BlurY.js');
}
function create() {
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'phaser');
logo.anchor.setTo(0.5, 0.5);
var blurX = game.add.filter('BlurX');
var blurY = game.add.filter('BlurY');
logo.filters = [blurX, blurY];
var group = game.add.group();
group.addChild(logo);
group.mask = game.add.graphics();
group.mask.beginFill(0xff);
group.mask.drawRect(0,0,500,500);
}
2015-06-08 20:43:20 +08:00
Charlo
70428fd39c
Fixed linting errors
2015-06-06 12:54:14 +02:00
Charlo
17a8116382
Added JSON support for BitmapFont
2015-06-06 12:35:08 +02:00
photonstorm
2b0abb67dd
onDragUpdate is a new signal that is dispatched whenever a Game object enabled for input and drag is moved by a pointer (i.e. during a drag event). See the Phaser.InputHandler.enableDrag
docs for parameter details and the new Phaser Example.
2015-06-04 20:58:00 +01:00
Richard Davey
660ab8510c
Merge pull request #1833 from danxexe/fix-drawcircle-docstring
...
Fix docstring of drawCircle
2015-06-04 04:23:45 +01:00
DanX
860d2e9538
Fix docstring of drawCircle
2015-06-03 13:41:42 -03:00
photonstorm
a971928bbc
jshint fixes.
2015-06-03 13:22:29 +01:00
photonstorm
52b1b499a8
Removed un-needed Pixi file.
2015-06-03 05:28:24 +01:00
photonstorm
560fed484f
Added BitmapText.purgeGlyphs method.
2015-06-03 05:28:24 +01:00
photonstorm
03a7b6a708
Updated Destroy component to deal with BitmapText glyphs pool.
2015-06-03 05:28:24 +01:00
photonstorm
5e265bbe86
Re-ordered carriage-return detection.
2015-06-03 05:28:24 +01:00
photonstorm
90d08fbf24
Updated jsdocs and added align parameter to method call.
2015-06-03 05:28:24 +01:00
photonstorm
fa7259fd75
Removed debug calls.
2015-06-03 05:28:24 +01:00
photonstorm
01de0de7ac
Added BitmapText global.
2015-06-03 05:28:24 +01:00
photonstorm
2484ced06d
Typo.
2015-06-03 05:28:24 +01:00
photonstorm
cf5238c749
Removed use of PIXI.BitmapText entirely. Moved all update and support functions to Phaser.
2015-06-03 05:28:23 +01:00
photonstorm
ed82097151
Removed un-necessary PIXI.TextureCache pollution in Phaser.LoaderParser.bitmapFont.
2015-06-03 05:28:23 +01:00
photonstorm
17648b74db
Complete refactoring of PIXI.updateText - now properly respects the maxWidth setting regardless of kerning or font scale.
2015-06-03 05:28:23 +01:00
photonstorm
76e2b00c82
Fixed pad jsdoc and ts defs ( #1823 )
2015-06-02 19:53:30 +01:00
luckylooke
ee22bbbd05
docs: parameter description augmented
...
addTilemap 'url' parameter text augmented
2015-05-31 13:21:33 +02:00
photonstorm
cc5740af10
BitmapText line spacing and word wrapping has been vastly improved and bought in-line with how Pixi 3 handles it, but with additional anchor support.
2015-05-31 01:31:11 +01:00
Richard Davey
86f155da80
Merge pull request #1804 from asyncanup/patch-1
...
Fixed spelling error in 'rotation'
2015-05-30 20:02:09 +01:00
photonstorm
1438248388
Group.add and Group.addAt will only create a Physics Body on the child if it doesn't already have one. This is a change from 2.3 where it would replace the physics body property with the new body, but this could lead to garbage build-up over time, so you should now properly destroy the body before changing it.
2015-05-29 00:59:23 +01:00
photonstorm
5ef9b0a5e6
TilemapParser.parseTiledJSON would ignore 'falsey' properties set on Objects in Tiled JSON tilemaps, such as x: 0
or visible: false
. These properties are now accurately copied over to the destination map data (thanks @MaksJS #1818 )
2015-05-27 18:07:33 +01:00
photonstorm
fcb2dc8306
Added snapPoint value (currently unused)
2015-05-26 20:01:57 +01:00
photonstorm
bdcb15fcde
Tween.to and Tween.from can now accept null
as the ease parameter value. If null
it will use the default tween, as per the documentation (thanks @nkovacs #1817 )
2015-05-26 20:01:57 +01:00
Casey Clyde
e935df328d
Sprite vs Tilemap can now check for overlap, without trying to separate
2015-05-23 22:39:12 -07:00
photonstorm
621e51d949
Docs update about the lovely 48000 Hz music bug.
2015-05-23 03:37:04 +01:00
photonstorm
18ae9268aa
Scope fix.
2015-05-22 15:14:49 +01:00
photonstorm
c2f7520c7a
StateManager.onStateChange is a new signal which is dispatched whenever the State changes from one to another. The callback you specify is sent two parameters: the string based key of the new state, and the second parameter is the string based key of the old / previous state.
2015-05-22 15:10:20 +01:00
photonstorm
5054344668
The LoadTexture component has a new property: customRender which is checked for in the Core postUpdate to know when to render custom elements like Videos.
2015-05-21 15:24:39 +01:00
photonstorm
312c31b778
jsdoc and formatting fixes.
2015-05-21 11:53:18 +01:00
luckylooke
1939efd1c1
Copypaste typo
...
`Point.setTo(2, 2)` to `Point.set(2, 2)`
2015-05-20 14:21:35 +02:00
Anup Bishnoi
ac92e3c58e
Fixed spelling error in 'rotation'
2015-05-19 22:48:03 -04:00
photonstorm
5a91f85b1f
Typo.
2015-05-19 16:57:36 +01:00
Richard Davey
4431e72711
Merge pull request #1770 from jeremyosborne/distsq
...
Fix for #1761 : [Feature Request] Add Math.distanceSq().
2015-05-19 16:14:57 +01:00
Richard Davey
8db0bfa377
Merge pull request #1785 from rblopes/fix-1782
...
Assign the default value of 60 FPS to the optional `frameRate` parameter, when ommited.
2015-05-19 15:04:45 +01:00
photonstorm
1e2940a6a4
PIXI.Graphics was calling Polygon.flatten in its drawShape call, causing the original Polygon object to internally change. It now takes a clone of the polygon and only flattens that ( #1779 )
2015-05-19 14:53:32 +01:00
photonstorm
d2bcb3562b
If transformUrl is given an invalid URL it returns false.
2015-05-19 14:19:24 +01:00
photonstorm
734fbfea9e
The mp4Video check includes h264 now.
2015-05-19 14:18:57 +01:00
photonstorm
0f6dd1a1a6
Device.firefoxVersion is a new property that contains the major Firefox version number if running within Firefox, otherwise zero.
2015-05-18 14:51:25 +01:00
photonstorm
7c9db8f632
jshint fixes.
2015-05-18 13:36:22 +01:00
photonstorm
2c775cf03d
FrameData.getFrameIndexes when called with a partial array (such as creating an animation out of a set of frames) would return the indexes array padded out with 'undefined' entries, causing short animations to never fully play through.
2015-05-18 12:55:48 +01:00
photonstorm
2e6af02f86
AnimationManager.add no longer sets the currentFrame
property when just adding an Animation to a Sprite. The currentFrame
property is now only set when the animation begins playing. This avoids the Sprite.frame and Sprite.frameName properties from returning incorrect results after adding (but not playing) an Animation. It also allows very short animations (2 frames) to play correctly without needing to loop.
2015-05-18 12:55:48 +01:00
Gionatan Iasio
1bbb3bb903
Fix Rope.js
...
Rope creation key parameter didn't work, because PIXI.Rope requires a texture, not string.
Changed it like Sprite.
2015-05-16 19:59:12 +02:00
photonstorm
f78a4cb337
jshint fixes.
2015-05-15 01:35:20 +01:00
photonstorm
f725ac48ae
Removed all the debug information.
2015-05-15 01:27:42 +01:00
photonstorm
f2e2039009
Invalidate the texture while we wait for the new one to load (crashes IE11 otherwise)
2015-05-15 01:17:44 +01:00
photonstorm
ce27da362b
Stacks of fixes to the video stream support to get it working in Firefox.
2015-05-14 23:23:38 +01:00
photonstorm
4fa99f52c5
jsdocs fix and video loader fallback for Firefox.
2015-05-14 23:23:22 +01:00
photonstorm
4cd374691a
Wrapped the decodeAudio in a try/catch.
2015-05-14 23:21:19 +01:00
photonstorm
b91387c9a6
Extended the getUserMedia and window.URL check.
2015-05-14 23:20:52 +01:00
photonstorm
aabeccbdac
Working but needs refining.
2015-05-14 19:10:36 +01:00
photonstorm
63887faffe
Loads of changes to deal with invalid textures and videos pending playback (i.e. Firefox)
2015-05-14 16:52:09 +01:00
photonstorm
71b242386d
Added video loadeddata callback for Firefox (which doesn't throw the canplay event until you actually start to play the video.. awesome, thanks Firefox)
2015-05-14 16:52:09 +01:00
photonstorm
ad4cf34d05
LoadTexture remembers texture valid state.
2015-05-14 16:52:09 +01:00
photonstorm
6c3d0833a3
Made silent texture fail the default.
2015-05-14 16:52:08 +01:00
Stephan de Souza
cb89b9c293
Missed comma
2015-05-14 10:04:37 -03:00
Stephan de Souza
7fb555e70e
Adds Heal Method to Phaser.Components.Health
...
Ideal when used in games with health packs, bonus items, or healing sprites.
In fact: Doing a negative damage causes the same effect, but as a new method is better for documentation.
2015-05-13 16:55:17 -03:00
Richard Davey
8aecb49d48
Merge pull request #1792 from formigone/dev-return-strict-bool
...
Return actual boolean value instead of 1
2015-05-13 10:59:13 +01:00
Rodrigo Silveira
ce7bcb2243
Return actual boolean value instead of 1
...
This is particularly helpful when doing === comparisons. Now isOdd is
consistent with isEven, which returns actual boolean values as well.
2015-05-13 05:59:34 -03:00
photonstorm
23f2a7ca66
Removed 'scale' from Group as it comes from PIXI anyway.
2015-05-12 13:03:27 +01:00
photonstorm
7c123b5203
Add guards around scaleSprite.
2015-05-12 13:03:26 +01:00
photonstorm
e6f71e959a
Graphics constructor now sets x/y parameters to zero if undefined. Before it would set them to undefined as the type check wasn't strict.
2015-05-12 13:03:26 +01:00