Richard Davey
da27373c90
Device.webAudio check inversed to avoid throwing a warning in Chrome.
2015-01-01 21:38:02 +00:00
photonstorm
a6c6bf8e06
Time.reset would incorrectly reset the _started
property, now maps it to Time.time
(thanks @XekeDeath #1467 )
2014-12-18 08:07:38 +00:00
photonstorm
013abfe956
Added Pixi 2.2.0 details to README.
2014-12-17 13:53:05 +00:00
photonstorm
c6c5856dec
Phaser.Graphics.drawCircle now overrides PIXI.drawCircle which means the docs are now correct re: diameter not radius (thanks @ethankaminski #1454 )
2014-12-17 13:44:12 +00:00
photonstorm
f23c0aa24b
Removed redundant tolerance
parameter from Rectangle.intersects (thanks @toolness #1463 )
2014-12-17 13:25:21 +00:00
photonstorm
269af69da5
Added extra checks to Sound.play to stop it throwing DOM Exception Error 11 if the sound.readyState
wasn't set or the sound was invalid. Also wrapped stop()
call in a
try catch`.
2014-12-17 13:07:19 +00:00
photonstorm
5029427e14
Tween.stop fired a different set of onComplete parameters to Tween.update. Both now dispatch onComplete(target, tween) as the parameters in that order (thanks @P0rnflake #1450 )
2014-12-15 09:42:18 +00:00
photonstorm
3c564a33b6
The P2 World constructor wouldn't let you use your own config unless you specified both the gravity *and* broadphase. Now allows one or both (thanks @englercj #1412 )
2014-12-11 22:04:45 +00:00
photonstorm
93e0d2f3b1
Docs update.
2014-12-11 22:00:06 +00:00
photonstorm
0cd0a5bd9b
Phaser 2.2.3 Build Files for testing.
2014-12-11 09:26:14 +00:00
photonstorm
8d9e1196c0
readme update.
2014-12-09 15:27:26 +00:00
photonstorm
38a224df3e
Tween.delay, Tween.repeat and Tween.yoyo will no longer throw an error if called before a TweenData object has been created (via Tween.to or Tween.from) (thanks @SomMeri #1419 )
2014-12-07 11:31:48 +00:00
photonstorm
e7f3b9188e
Preparing for Phaser 2.2.2 development.
2014-12-04 11:49:53 +00:00
photonstorm
d206e3c2d5
Docs update.
2014-12-04 11:28:02 +00:00
photonstorm
847cde81a9
Custom Particle classes that used a BitmapData wouldn't work (thanks @hardalias #1402 )
2014-12-03 20:59:44 +00:00
photonstorm
3371f9ff1e
Added Game.debug reset method for when the debug manager is disabled (thanks @DanielSitarz #1407 )
2014-12-03 20:56:39 +00:00
photonstorm
1227232fd6
Updated readme.
2014-12-03 20:54:25 +00:00
photonstorm
e271c63ca6
Preparing for Phaser 2.2.1.
2014-12-03 13:41:48 +00:00
photonstorm
95ffa83e34
Phaser 2.2.0 Docs.
2014-12-03 10:39:20 +00:00
photonstorm
35e2893db4
Game.lockRender is a new property. If false
Phaser will automatically render the display list every update. If true
the render loop will be skipped. You can toggle this value at run-time to gain exact control over when Phaser renders. This can be useful in certain types of game or application. Please note that if you don't render the display list then none of the game object transforms will be updated, so use this value carefully.
2014-12-02 09:03:55 +00:00
photonstorm
def662f28f
Text.setShadow has had the default color
value changed from rgba(0,0,0,0)
to rgba(0,0,0,1)
so it appears as a black shadow by default - before the alpha channel made it invisible.
2014-12-02 09:03:55 +00:00
photonstorm
5b6e41b112
Readme updated.
2014-12-02 09:03:55 +00:00
photonstorm
30d2d1973a
readme update.
2014-11-27 21:33:21 +00:00
photonstorm
fb733ddcca
onPreRenderCallback wasn't being cleared on a State swap.
2014-11-26 13:12:51 +00:00
photonstorm
667d477a16
P2.BodyDebug always lagged behind the position of the Body it was tracking by one frame, which became visible at high speeds. It now syncs its position in the Body.postUpdate which prevents this from happening (thanks @valueerror)
2014-11-25 22:21:11 +00:00
photonstorm
e86f00eb55
Text.lineSpacing works correctly again. Before no space was added between the lines (thanks @intimidate #1367 and @brejep #1366 )
2014-11-25 17:06:17 +00:00
photonstorm
72eaee3139
Adjusted Sprite.preUpdate to remove the lifespan calculation.
2014-11-25 14:18:18 +00:00
photonstorm
7aaa63e7a5
When you change State the P2 Physics world is no longer fully cleared. All of the bodies, springs, fixtures, materials and constraints are removed - but config settings such as gravity, restitution, the contact solver, etc are all retained. The P2.World object is only created the very first time you call Physics.startSystem. Every subsequent call hits P2.World.reset instead ( #1292 )
2014-11-25 12:09:03 +00:00
photonstorm
54e79f5b25
Grunt and docs updates.
2014-11-25 00:24:29 +00:00
photonstorm
4ecd7f99a8
Docs update.
2014-11-24 11:12:09 +00:00
photonstorm
1928427bcb
Phaser TypeScript defs fixes.
2014-11-23 11:32:13 +00:00
photonstorm
874f60c1bc
Removed CocoonJS hack - woohoo!
2014-11-21 10:40:18 +00:00
photonstorm
7e4a494f13
Keyboard.justPressed has bee renamed to Keyboard.downDuration which is a much clearer name for what the method actually does.
...
Keyboard.justReleased has bee renamed to Keyboard.upDuration which is a much clearer name for what the method actually does.
Keyboard.downDuration, Keyboard.upDuration and Keyboard.isDown now all return `null` if the Key wasn't found in the local keys array.
2014-11-20 20:55:51 +00:00
photonstorm
88ea3412dc
Fixes issue where Tween.from didn't set the target properties until after the delay was up.
2014-11-20 20:42:10 +00:00
photonstorm
2589000435
Tweens have been completely rewritten. They're now much more flexible and efficient than before:
...
When specifying the ease in `Tween.to` or `Tween.from` you can now use a string instead of the Function. This makes your code less verbose. For example instead of `Phaser.Easing.Sinusoidal.Out` and you can now just use the string "Sine".The string names match those used by TweenMax and includes: "Linear", "Quad", "Cubic", "Quart", "Quint", "Sine", "Expo", "Circ", "Elastic", "Back", "Bounce", "Power0", "Power1", "Power2", "Power3" and "Power4". You can append ".easeIn", ".easeOut" and "easeInOut" variants. All are supported for each ease types.
Tweens now create a TweenData object. The Tween object itself acts like more of a timeline, managing multiple TweenData objects. You can now call `Tween.to` and each call will create a new child tween that is added to the timeline, which are played through in sequence.
Tweens are now bound to the new Time.desiredFps value and update based on the new Game core loop, rather than being bound to time calculations. This means that tweens are now running with the same update logic as physics and the core loop.
Tween.timeScale allows you to scale the duration of a tween (and any child tweens it may have). A value of 1.0 means it should play at the desiredFps rate. A value of 0.5 will run at half the frame rate, 2 at double and so on. You can even tween the timeScale value for interesting effects!
Tween.reverse allows you to instantly reverse an active tween. If the Tween has children then it will smoothly reverse through all child tweens as well.
Tween.repeatAll allows you to control how many times all child tweens will repeat before firing the Tween.onComplete event. You can set the value to -1 to repeat forever.
Tween.loop now controls the looping of all child tweens.
Tween.onRepeat is a new signal that is dispatched whenever a Tween repeats. If a Tween has many child tweens its dispatched once the sequence has repeated.
Tween.onChildComplete is a new signal that is dispatched whenever any child tweens have completed. If a Tween consists of 4 sections you will get 3 onChildComplete events followed by 1 onComplete event as the final tween finishes.
Chained tweens are now more intelligently handled. Because you can easily create child tweens (by simply calling Tween.to multiple times) chained tweens are now used to kick-off longer sequences. You can pass as many Tween objects to `Tween.chain` as you like as they'll all be played in sequence. As one Tween completes it passes on to the next until the entire chain is finished.
Tween.stop has a new `complete` parameter that if set will still fire the onComplete event and start the next chained tween, if there is one.
Tween.delay, Tween.repeat, Tween.yoyo, Tween.easing and Tween.interpolation all have a new `index` parameter. This allows you to target specific child tweens, or if set to -1 it will update all children at once.
Tween.totalDuration reports the total duration of all child tweens in ms.
There are new easing aliases:
* Phaser.Easing.Power0 = Phaser.Easing.Linear.None
* Phaser.Easing.Power1 = Phaser.Easing.Quadratic.Out
* Phaser.Easing.Power2 = Phaser.Easing.Cubic.Out
* Phaser.Easing.Power3 = Phaser.Easing.Quartic.Out
* Phaser.Easing.Power4 = Phaser.Easing.Quintic.Out
2014-11-20 06:06:26 +00:00
photonstorm
aa72cf63c1
Emitter.setScale fixed minX minY order presedence (thanks spayton)
2014-11-18 15:38:08 +00:00
photonstorm
07d43934c6
Docs update.
2014-11-18 12:43:26 +00:00
photonstorm
21479acd8e
Sprite.autoCull now properly works if the camera moves around the world.
...
Sprite.inCamera uses a much faster check if auto culling or world bounds checks are enabled and properly adjusts for camera position.
2014-11-18 12:29:55 +00:00
photonstorm
5cd4225412
If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out of AudioContext nodes. If this is the case create a global var called PhaserGlobal
on the window object before creating the game. The active AudioContext will then be saved to window.PhaserGlobal.audioContext
when the Phaser game is destroyed, and re-used when it starts again ( #1233 )
2014-11-16 21:05:31 +00:00
photonstorm
b635ca511e
docs update
2014-11-16 19:13:53 +00:00
photonstorm
02665076e6
Docs updates.
2014-11-15 19:50:03 +00:00
photonstorm
d8d2ebdb31
Phaser 2.2.0 - Release Candidate 6.
2014-11-14 08:16:55 +00:00
photonstorm
527934d909
Key.justPressed has bee renamed to Key.downDuration which is a much clearer name for what the method actually does. See Key.justDown for a nice clean alternative.
...
Key.justReleased has bee renamed to Key.upDuration which is a much clearer name for what the method actually does. See Key.justUp for a nice clean alternative.
Key.justDown allows you to test if a Key has just been pressed down or not. You can only call justDown once per key press. It will only return `true` once, until the Key is released and pressed down again. This allows you to use it in situations where you want to check if this key is down without using a Signal, such as in a core game loop (thanks @pjbaron #1321 )
Key.justUp allows you to test if a Key has just been released or not. You can only call justUp once per key press. It will only return `true` once, until the Key is pressed down and released again. This allows you to use it in situations where you want to check if this key is up without using a Signal, such as in a core game loop (thanks @pjbaron #1321 )
2014-11-13 13:01:58 +00:00
photonstorm
b855df2656
Docs update.
2014-11-13 12:39:32 +00:00
photonstorm
e7356fc575
Pixi 2.1.1 merge.
2014-11-12 22:38:51 +00:00
photonstorm
515dff3b04
docs updated
2014-11-12 22:28:49 +00:00
photonstorm
1352b526c7
Merged final Pixi v2.1.0 release.
2014-11-11 23:24:50 +00:00
photonstorm
da031d8bbb
Phaser games should now work again from the CocoonJS Launcher.
2014-11-11 14:31:20 +00:00
photonstorm
042ceeb59d
Docs update.
2014-11-11 05:56:38 +00:00
photonstorm
bf70df2658
Game.forceSingleUpdate will force just a single logic update, regardless of the delta timer values. You can use this in extremely heavy CPU situations where you know you're about to flood the CPU but don't want Phaser to get stuck in a spiral.
2014-11-11 05:51:56 +00:00
photonstorm
a2b7d339a2
Tilemap.createFromTiles will convert all tiles matching the given tile index (or an array of indexes) into Sprites. You can optionally then replace these tiles if you wish. This is perfect for games when you want to turn specific tiles into Sprites for extra control. The Sprites have an optional properties object which they can be populated with.
2014-11-11 01:05:59 +00:00
photonstorm
8bf93fb658
ArcadePhysics.skipQuadTree is now set to true
by default. A QuadTree is a wonderful thing if the objects in your game are well spaced out. But in tightly packed games, especially those with tilemaps or single-screen games, they are a considerable performance drain and eat up CPU. We've taken the decision to disable the Arcade Physics QuadTree by default. It's all still in there and can be re-enabled via game.physics.arcade.skipQuadTree = false
, but please only do so if you're sure your game benefits from this.
2014-11-11 01:05:58 +00:00
photonstorm
547e7a4d1d
docs update
2014-11-09 23:15:30 +00:00
photonstorm
0a86a7ef51
Time.now can no longer be relied upon to contain a timestamp value. If the browser supports requestAnimationFrame then Time.now
will contain the high resolution timer value that rAf generates. Otherwise it will contain the value of Date.now. If you require the actual time value (in milliseconds) then please use Time.time
instead. Note that all Phaser sub-systems that used to rely on Time.now
have been updated, so if you have any code that extends these please be sure to check it.
2014-11-08 20:01:10 +00:00
photonstorm
71507c5487
Moving to 2.2.0 release version.
2014-11-08 19:25:47 +00:00
photonstorm
a0cc4c3777
A large refactor to how the internal game timers and physics calculations has been made. We've now swapped to using a fixed time step internally across Phaser, instead of the variable one we had before that caused glitchse on low-fps systems. Thanks to pjbaron for his help with all of these related changes.
...
We have separated the logic and render updates to permit slow motion and time slicing effects. We've fixed time calling to fix physics problems caused by variable time updates (i.e. collisions sometimes missing, objects tunneling, etc)
Once per frame calling for rendering and tweening to keep things as smooth as possible
Calculates a `suggestedFps` value (in multiples of 5 fps) based on a 2 second average of actual elapsed time values in the `Time.update` method. This is recalculated every 2 seconds so it could be used on a level-by-level basis if a game varies dramatically. I.e. if the fps rate consistently drops, you can adjust your game effects accordingly.
Game loop now tries to "catch up" frames if it is falling behind by iterating the logic update. This will help if the logic is occasionally causing things to run too slow, or if the renderer occasionally pushes the combined frame time over the FPS time. It's not a band-aid for a game that floods a low powered device however, so you still need to code accordingly. But it should help capture issues such as gc spikes or temporarily overloaded CPUs.
It now detects 'spiralling' which happens if a lot of frames are pushed out in succession meaning the CPU can never "catch up". It skips frames instead of trying to catch them up in this case. Note: the time value passed to the logic update functions is always constant regardless of these shenanigans.
Signals to the game program if there is a problem which might be fixed by lowering the desiredFps
Time.desiredFps is the new desired frame rate for your game.
Time.suggestedFps is the suggested frame rate for the game based on system load.
Time.slowMotion allows you to push the game into a slow motion mode. The default value is 1.0. 2.0 would be half speed, and so on.
Time.timeCap is no longer used and now deprecated. All timing is now handled by the fixed time-step code we've introduced.
2014-11-08 18:54:54 +00:00
photonstorm
55953078d0
FrameData.clone fixed when cloning data using frame names rather than indexes (thanks pjbaron)
2014-11-08 17:08:29 +00:00
photonstorm
0f3849491d
P2.BodyDebug circles were drawing at half widths (thanks @enriqueto #1288 )
2014-11-08 14:09:26 +00:00
photonstorm
19d8773ca6
readme updates.
2014-11-08 13:42:23 +00:00
photonstorm
2777c2a463
ScaleManager.elementBounds is a cross-browser element.getBoundingClientRect method with optional cushion.
...
ScaleManager.calibrate is a private method that calibrates element coordinates for viewport checks.
ScaleManager.aspect gets the viewport aspect ratio (or the aspect ratio of an object or element)
ScaleManager.inViewport tests if the given DOM element is within the viewport, with an optional cushion parameter that allows you to specify a distance.
ScaleManager.scaleSprite takes a Sprite or Image object and scales it to fit the given dimensions. Scaling happens proportionally without distortion to the sprites texture. The letterBox parameter controls if scaling will produce a letter-box effect or zoom the sprite until it fills the given values.
ScaleManager.viewportWidth returns the viewport width in pixels.
ScaleManager.viewportHeight returns the viewport height in pixels.
ScaleManager.documentWidth returns the document width in pixels.
ScaleManager.documentHeight returns the document height in pixels.
2014-11-08 13:31:35 +00:00
photonstorm
7e404604d3
docs update.
2014-11-04 23:57:21 +00:00
photonstorm
be8499fa49
Moved ts defs to new home.
2014-11-02 23:00:15 +00:00
photonstorm
807e443a31
The Input class has been given a minor refactor to tidy things up. Specifically:
...
* pointerN are aliases to backed pointers[N-1] array. This simplifies (and increases the efficiency of) looping through all the pointers when applicable; also eliminates pointer-existance checks Removes various hard-coded limits (added MAX_POINTERS); changed maxPointers default
* Removed some special-casing from cases where it did not matter
* Removed === false/true, == usage for consistency, changed missing value check to typeof, etc.
* Updated documentation for specificty; added @public\@protected
* @deprecated currentPointers due to odd set pattern; totalCurrentPointers is more appropriate.
(thanks @pnstickne #1283 )
2014-11-02 12:26:46 +00:00
photonstorm
97edb7b830
Pointer.addClickTrampoline now adds in support for click trampolines. These raise pointer events into click events, which are required internally for a few edge cases like IE11 full screen mode support, but are also useful if you know you specifically need a DOM click event from a pointer (thanks @pnstickne #1282 )
2014-11-02 12:18:23 +00:00
photonstorm
8b2628d99c
All of the Input classes now use the more consistent enabled
property instead of disabled
. I.e. you can now check if (input.mouse.enabled)
rather than if (!input.mouse.disabled)
. The disabled property has been moved to a getter for backwards compatibility but is deprecated and will be removed in a future version (thanks @pnstickne #1257 )
2014-11-02 12:14:47 +00:00
photonstorm
e853cb14bb
readme update
2014-11-02 11:04:03 +00:00
photonstorm
59b25ab6bb
Animation.setFrame used the wrong frames array if useLocalFrameIndex
was false
and a numeric frame ID was given (thanks @Skeptron #1284 )
2014-11-02 11:04:03 +00:00
photonstorm
e57c700816
The Gamepad.addCallbacks context parameter was never actually remembered, causing the callbacks to run in the wrong context (thanks @englercj #1285 )
2014-11-02 11:04:02 +00:00
photonstorm
ce32d492af
Phaser.Polygon has been refactored to address some Pixi v2 migration issues (thanks @pnstickne for the original implementation #1267 )
...
Polygon.area is now only calculated when the Polygon points list is modified, rather than on every call.
Phaser.Polygon can now accept the points list in a variety of formats: Arrays of Points, numbers, objects with public x/y properties or any combination of, or as a parameter list (thanks @pnstickne for the original implementation #1267 )
Polygon.contains now correctly calculates the result (thanks @pnstickne @BurnedToast #1267 )
2014-10-29 07:46:56 +00:00
photonstorm
dc20ab6020
Text.updateText was incorrectly increasing the size of the texture each time it was called (thanks @spayton #1261 )
2014-10-29 07:46:56 +00:00
photonstorm
d1b79f90a5
Polygon.contains was toggling the return value on each valid hit (thanks @Singularetantum #1265 #1266 )
2014-10-29 07:46:56 +00:00
photonstorm
1df98d82e3
You can now call Tween.to again on a Tween that has already completed. This will re-use the same tween, on the original object, without having to recreate the Tween again. This allows a single tween instance to be re-used multiple times, providing they are linked to the same object (thanks InsaneHero)
2014-10-28 01:49:20 +00:00
photonstorm
dfa442db93
Particle.Emitter will now automatically set particle.body.skipQuadTree
to true
to help with collision speeds within Arcade Physics.
...
Particle.Emitter.explode (or `Emitter.start` with the `explode` parameter set to `true`) will immediately emit the required quantity of particles and not delay until the next frame to do so. This means you can re-use a single emitter across multiple places in your game that require explode-style emissions, just by adjusting the `emitter.x` and `emitter.y` properties before calling explode (thanks Insanehero)
2014-10-27 23:29:43 +00:00
photonstorm
a471cfc235
Game.destroy now destroys either the WebGLRenderer or CanvasRenderer, whichever Pixi was using.
2014-10-27 22:09:39 +00:00
photonstorm
da87c75e00
Loader.useXDomainRequest used to be enabled automatically for IE9 but is now always set to false
. Please enable it only if you know your server set-up / CDN requires it, as some most certainly do, but we're finding them to be less and less used these days, so we feel it's safe to now disable this by default ( #1248 )
...
Loader.json was using the wrong context in IE9 with XDomainRequest calls (thanks @pnstickne #1258 )
2014-10-27 12:31:55 +00:00
photonstorm
0f3cda0aed
Cache.getRenderTexture will retrieve a RenderTexture that is stored in the Phaser Cache. This method replaces Cache.getTexture which is now deprecated.
...
Cache.autoResolveURL is a new boolean (default `false`) that automatically builds a cached map of all loaded assets vs. their absolute URLs, for use with Cache.getURL and Cache.checkURL. Note that in 2.1.3 and earlier this was enabled by default, but has since been moved behind this property which needs to be set to `true` *before* you load any assets to enable.
Cache._resolveUrl has been renamed to Cache._resolveURL internally and gained a new parameter. This method is a private internal one.
Cache.getUrl is deprecated. The same method is now available as Cache.getURL.
XML files weren't being added to the URL map.
Cache._resolveURL was causing a Sound double-load in Firefox and causing errors (thanks @domonyiv #1253 )
2014-10-27 11:46:24 +00:00
photonstorm
12c2f83bfc
Repackaging for 2.1.4 release.
2014-10-27 10:59:37 +00:00
Richard Davey
35c42e3073
Tilemaps in WebGL wouldn't update after the first frame due to a subtle change in how Pixi uploads new textures to the GPU.
2014-10-25 10:09:04 +01:00
photonstorm
18f6b320ab
Preparing for Phaser v2.2.0
2014-10-23 13:52:39 +01:00
photonstorm
fbe68e330d
Phaser 2.1.3 build.
2014-10-22 21:42:12 +01:00
photonstorm
9b16b11c88
Small Roadmap update.
2014-10-21 22:45:36 +01:00
photonstorm
01a068f53c
Rectangle.scale allows you to scale the width and height of a Rectangle.
2014-10-21 00:25:54 +01:00
photonstorm
9d58297eb9
Button.setSounds now works if given an AudioSprite as the sound source.
2014-10-20 23:17:05 +01:00
photonstorm
1a357e18c8
Rectangle contains updates.
2014-10-20 14:28:09 +01:00
photonstorm
b580746cb8
Input.hitTest now accurately detects hits on the extreme edges of a display object (thanks InsaneHero)
2014-10-20 14:28:09 +01:00
photonstorm
d70406588c
Filter.update now caches the previous pointer position to avoid flooding the uniform. Also the mouse uniform is now a value between 0 and 1 depending on the position within the game view.
2014-10-17 19:29:50 +01:00
photonstorm
f0b7670506
Fixed an issue where audio files with query strings after them would fail the canPlayAudio
checks (thanks Vithar)
2014-10-17 18:50:12 +01:00
photonstorm
52f1663642
Fixed the Filter mouse uniform value population.
2014-10-17 16:52:28 +01:00
photonstorm
4f1ba99120
BitmapData.getFirstPixel will scan the BitmapData and return the color and location of the first non-transparent pixel encountered. You can specify one of 4 scan directions: top to bottom, bottom to top, left to right and right to left.
...
BitmapData.getBounds will return a `Rectangle` object that encompasses the full extent of the non-transparent pixels in the BitmapData. This can be useful if you wish to trim away transparent pixels from the sides of a BitmapData down to size before saving.
2014-10-17 16:51:50 +01:00
photonstorm
fbfb107146
JSDoc fixes in the Rope class (thanks @Rovanion)
2014-10-15 22:05:38 +01:00
photonstorm
2657de0daa
Sound.fadeTo allows you to fade the Sound to the given volume over the duration specified (thanks @nickryall #1225 )
2014-10-15 21:48:00 +01:00
photonstorm
db68dd2780
docs update.
2014-10-15 21:39:33 +01:00
photonstorm
9140163c85
Fixed a reference error to the Loader.baseURL in Cache._resolveUrl method (thanks @neurofuzzy #1235 )
2014-10-15 21:36:44 +01:00
photonstorm
4ac162216a
readme updates.
2014-10-14 01:10:26 +01:00
photonstorm
3997a7c372
Time.prevTime is a new property that contains the raw value of the game timer from the previous update.
...
Timer.timeCap has been changed from `1000` to `1 / 60 * 1000` to bring it in line with Time.timeCap.
2014-10-13 16:18:42 +01:00
photonstorm
5d84f38f6e
Device.canPlayAudio now supports the opus
files directly, as well as opus
encoded audio stored in ogg containers ( #1232 )
2014-10-13 13:52:41 +01:00
photonstorm
ac27f12c95
Fixes for Pixi update WebGL UV calls.
2014-10-11 04:18:42 +01:00
photonstorm
163a6c46f3
Updated to Pixi 2.0.0-dev.
2014-10-10 20:36:04 +01:00
photonstorm
022d7094d5
jsdoc fixes and frameRate change.
2014-10-10 14:49:01 +01:00
photonstorm
bee0e73748
Preparing for 2.1.3 dev.
2014-10-09 16:32:31 +01:00
photonstorm
9f24c08216
Updated readme and docs.
2014-10-09 16:12:53 +01:00
photonstorm
506a091257
Sound.allowMultiple allows you to have multiple instances of a single Sound playing at once. This is only useful when running under Web Audio, and we recommend you implement a local pooling system to not flood the sound channels. But it allows for one Sound object to play overlapping times, useful for gun effects and similar ( #1220 )
2014-10-09 14:44:25 +01:00
photonstorm
a2a60f207f
Updated readme and TS defs.
2014-10-09 14:16:24 +01:00
photonstorm
94b6c01f31
readme updates.
2014-10-09 14:16:23 +01:00
photonstorm
b00866cee9
AnimationManager.name will now return the name
property of the currently playing animation, if any.
2014-10-09 14:06:13 +01:00
Richard Davey
5dbe6b6017
The Uint32Array check used in Utils was incorrectly replacing Uint32Array on Safari, causing errors like BitmapData.getPixel32 to fail and other related issues ( fixes #1043 and #1197 )
2014-10-05 12:35:40 +01:00
photonstorm
ab78710daa
BitmapData.textureLine takes a Phaser.Line object and an image in the image cache. It then accurately draws the image as a repeating texture for the full length of the line.
2014-10-03 02:21:09 +01:00
photonstorm
173786c60d
Color.createColor now populates the color
property of the returned object with the results of Phaser.Color.getColor
.
...
Color.createColor now has a `color32` property with the results of `Phaser.Color.getColor32`.
Color.hexToColor has been optimised to inline the regex and has moved the createColor call so it now populates the color object fully, not just setting the r,g,b properties.
2014-10-01 16:51:34 +01:00
photonstorm
2794d94b08
Color.createColor now populates the color objects color
and color32
properties with the results of Phaser.Color.getColor
and getColor32
respectively.
2014-10-01 15:19:57 +01:00
photonstorm
d65c526184
Cache.addBitmapData has a new parameter: frameData
allowing you to pass a Phaser.FrameData
object along with the BitmapData.
...
Cache.getFrameData has a new parameter: `map` which allows you to specify which cache to get the FrameData from, i.e. `Phaser.Cache.IMAGE` or `Phaser.Cache.BITMAPDATA`.
Sprite.loadTexture if given a BitmapData as the texture will now query the cache to see if it has any associated FrameData, and if so it will load that into the AnimationManager.
2014-10-01 03:10:13 +01:00
photonstorm
26f9e05dca
BitmapData.shadow(color, blur, x, y) provides a quick way to set all the relevant shadow settings, which are then be used in future draw calls.
2014-09-30 22:50:08 +01:00
photonstorm
ef85b8415d
If you pass a tinted Sprite to BitmapData.draw
or BitmapData.copy
it will now draw the tinted version of the Sprite to the BitmapData and not the original texture.
2014-09-30 21:07:57 +01:00
photonstorm
c195998a1e
Color.webToColor restored. Converts a CSS rgba color into a native color value.
2014-09-30 01:44:33 +01:00
photonstorm
ecfed2b311
AnimationParser is now using value
instead of nodeValue
when parsing atlas XML files, avoiding Chrome deprecation warnings (thanks @valtterip #1189 )
2014-09-29 22:52:09 +01:00
photonstorm
ccc4e42e03
A Timer with a delay value that was a float and not an integer would not loop correctly. Timer delay values are now passed through Math.round to avoid this (thanks @osmanzeki #1196 )
2014-09-29 22:15:41 +01:00
Richard Davey
acba9c4e14
Updated TypeScript defs.
2014-09-29 12:14:02 +01:00
photonstorm
415c7fe578
Added the sourceRect
and maskRect
parameters back into BitmapData.alphaMask
as they were accidentally removed in 2.1 (thanks seejay92)
2014-09-25 15:30:03 +01:00
photonstorm
7f196a01e7
Text.addColor allows you to set specific colors within the Text. It works by taking a color value, which is a typical HTML string such as #ff0000
or rgb(255,0,0)
and a position. The position value is the index of the character in the Text string to start applying this color to. Once set the color remains in use until either another color or the end of the string is encountered. For example if the Text was Photon Storm
and you did Text.addColor('#ffff00', 6)
it would color in the word Storm
in yellow.
...
Text.clearColors resets any previously set colors from `Text.addColor`.
2014-09-24 17:10:02 +01:00
photonstorm
9e29a58d89
Sound.fadeOut(duration) will fade the Sound to a volume of zero over the duration given. At the end of the fade the Sound will be stopped and Sound.onFadeComplete dispatched.
...
Sound.fadeIn(duration, loop) will start the Sound playing, or restart it if already playing, set its volume to zero and then increase the volume over the duration given until it reaches 1. At the end of the fade the Sound.onFadeComplete event is dispatched.
2014-09-24 06:51:39 +01:00
photonstorm
dd74e3b0b4
Changing any of the Text properties such as font, lineSpacing and fontSize on a Text object that wasn't already on the display list would cause an updateTransform error. Parent is now checked first in all setters.
2014-09-24 01:10:36 +01:00
Richard Davey
abe6f5ace2
Point.parse updated to allow either/or x/y setting and default values.
...
Point.parse will return a new Point object based on the x and y properties of the object given to Point.parse (thanks @codevinsky #1198 )
2014-09-23 22:23:01 +01:00
Richard Davey
01fd3df434
AudioSprite support is now built into the Loader and SoundManager. AudioSprites are like sprite sheets, only they consist of a selection of audio files and markers in a json configuration. You can find more details at https://github.com/tonistiigi/audiosprite (thanks @codevinsky #1205 )
...
Fixed AudioSprite jsdoc, casing and formatting issues.
2014-09-23 22:15:09 +01:00
Richard Davey
0c4d4cd7e1
readme update.
2014-09-19 15:22:33 +01:00
photonstorm
5980a3bdc6
Loader can now natively load XML files via load.xml
. Once the XML file has loaded it is parsed via either DOMParser or ActiveXObject and then added to the Cache, where it can be retrieved via cache.getXML(key)
.
...
Cache now has support for XML files stored in their own container. You can add them with `cache.addXML` (typically this is done from the Loader automatically for you) and get them with `cache.getXML(key)`. There is also `cache.checkXMLKey(key)`, `cache.checkKeys` and `cache.removeXML(key)`.
2014-09-19 13:45:04 +01:00
photonstorm
597b828d7a
StateManager.boot would call start on a State twice if it was added to the game and started before the DOM load had completed. This didn't cause an error but was duplicating function calls needlessly.
2014-09-18 05:14:44 +01:00
photonstorm
d68ed61999
If you called StateManager.start from within a states init
method which also had a preload
method it would fail to start the next State.
2014-09-18 05:11:58 +01:00
Richard Davey
cf363a56f1
Cache.removeImage has a new parameter: removeFromPixi
which is true
by default. It will remove the image from the Pixi BaseTextureCache as well as from the Phaser Cache. Set to false if you don't want the Pixi cache touched.
2014-09-16 12:20:03 +01:00
photonstorm
fc6b7dd36c
StateManager.unlink will null all State-level Phaser properties, such as game
, add
, etc. Useful if you never need to return to the State again.
2014-09-15 13:19:01 +01:00
photonstorm
60acef2f97
If Game Objects change their frame, such as with an animated Sprite, and the change goes from a previously trimmed frame to a non-trimmed (full size) one, then the previous trim values were still left active, causing it to glitch (thanks stupot)
2014-09-11 20:56:01 +01:00
photonstorm
e5cac96302
Preparing for 2.1.2
2014-09-11 12:02:20 +01:00
photonstorm
5b922be56e
Version 2.1.1. of Phaser is an emergency point release. It addresses a potential race condition that could happen in States that tried to change state from the create
method but had an empty preloader or pre-cached assets.
2014-09-11 10:38:40 +01:00
photonstorm
a1a0861070
readme update + screen shot
2014-09-11 10:38:38 +01:00
photonstorm
b801630d78
Preparing for 2.1.1 development.
2014-09-09 16:50:23 +01:00
photonstorm
33d9b19e29
The Debug canvas is now cleared on State swap.
2014-09-09 15:28:58 +01:00
photonstorm
133ffd5fd1
2.1.0 docs updates.
2014-09-09 14:47:30 +01:00
photonstorm
1f089d74c5
Phaser.Easing.Default is a new property that is used when a specific type of ease isn't given. It defaults to Linear.None but can be overridden to anything (thanks @alvinsight)
2014-09-09 14:01:49 +01:00
photonstorm
c40c140631
Camera.roundPx is a new boolean. If set to true
it will call view.floor
as part of its update loop, keeping its boundary to integer values. Set to false
to disable this from happening ( #1141 )
2014-09-09 12:47:27 +01:00
photonstorm
79d873f47b
If you are using CocoonJS, please set your game render type to CANVAS and not WEBGL or AUTO. You should also disable any of the ScaleManager screen resizing or margin setting code. By default in this mode CocoonJS will now set 'screencanvas=true' which helps with performance significantly.
2014-09-08 22:34:53 +01:00
photonstorm
282db76351
Readme update.
2014-09-08 22:34:53 +01:00
photonstorm
df16970bcc
Readme update.
2014-09-08 22:34:53 +01:00
photonstorm
59f7c53019
P2.Body.addCapsule didn't use to pass the radius value through pxm, but now does so you have to specify it in pixels, not meters.
2014-09-08 22:34:53 +01:00
photonstorm
4903e47a98
Rectangle.topRight returns a Point object that represents the top-right coordinate of the Rectangle.
2014-09-05 15:45:47 +01:00
photonstorm
0af4ec4da2
The StateManager will now check if a State has a method called resize
. If it does, and if the game is running in the RESIZE Scale Mode then this method will be called whenever the game resizes. It will be passed two parameters: width
and height
that will match the games new dimensions. Resizing can happen as a result of either the parent container changing shape, or the browser window resizing.
2014-09-05 06:22:10 +01:00
photonstorm
f2a8a927f9
Group.addMultiple allows you to pass an array of game objects and they'll all be added to the Group in turn.
2014-09-05 06:01:25 +01:00
photonstorm
cb14fd1c01
Rectangle.centerOn(x,y) allows you to quickly center a Rectangle on the given coordinates.
2014-09-05 04:13:21 +01:00
photonstorm
d5ffe1f971
Phaser.Mouse will now add a listener to the window
to detect mouseup
events. This is used to detect if the player releases the mouse while outside of the game canvas. Previously Pointer objects incorrectly thought they were still pressed when you returned the mouse over the canvas ( #1167 )
2014-09-04 23:29:43 +01:00
Richard Davey
7ee1564f2e
Signal.removeAll would ignore the context parameter and remove all bindings regardless (thanks @alect #1168 )
2014-09-04 22:24:47 +01:00
Richard Davey
55400ce988
World.createDistanceConstraint signature changed to include new local anchors (thanks @rhmoller #1169 )
2014-09-04 22:22:10 +01:00
photonstorm
9aaa8d80ca
jsdocs, fixes to load, draw, copy and addToWorld.
2014-09-04 05:05:30 +01:00
photonstorm
7d9a4f4100
Phaser.Text wouldn't render the text to its local canvas if you passed the text on the constructor and didn't add it to the display list. If a string is given it now updates the local canvas on creation.
2014-09-04 02:18:12 +01:00
Richard Davey
0d486aa949
Updated the road map.
2014-09-03 23:01:24 +01:00
Richard Davey
168ce82fe8
Rectangle.bottom setter swapped the order of the calculation (thanks @JakeCoxon #1165 )
2014-09-03 22:42:24 +01:00
Richard Davey
fe0c03d5d7
Phaser.Text.destroy will now destroy the base texture by default ( #1162 )
2014-09-03 22:34:10 +01:00
Richard Davey
42f19f4978
Phaser.Canvas.setImageRenderingCrisp now sets image-rendering: pixelated, perfect for pixel art and which is now supported in Chrome 38.
2014-09-03 22:16:03 +01:00
photonstorm
15e6edc56b
BitmapData.copy no longer creates any temporary variables. It also accurately copies over Sprite/Image values before drawing them.
...
Creation now defaults to a texture size of 256x256.
2014-09-03 12:53:07 +01:00
photonstorm
1f84024a3e
Cache.getImage now returns null if no image was found.
2014-09-03 11:11:48 +01:00
photonstorm
8bc5ba8d7d
Tween.generateData would skip the end values in the data array. They are now included as the object in the final array element.
2014-09-02 15:45:52 +01:00
photonstorm
865c6878bf
P2.World.getSprings used to return an empty array, but now returns all the Springs in the world ( #1134 )
2014-09-02 15:06:43 +01:00
photonstorm
d26f937f1c
RetroFont has a new property called frameData which contains the Frame objects for each of the letters in the font, which can be used by Sprites.
2014-09-02 00:41:53 +01:00
Richard Davey
152335ff46
docs update.
2014-09-01 21:33:29 +01:00
Carlos Martinez
a869939bc3
Merge branch 'master' of https://github.com/photonstorm/phaser into dev
2014-09-01 14:20:15 +01:00
photonstorm
070e33f1e7
ArcadePhysics.overlap has been updated so that the Body.overlapX/Y properties are set to the amount the two bodies overlapped by. Previously they were zero and only populated during the separation phase, but now the data is available for just overlap checks as well. You can then use these values in your ovrelap callback as required - note that they are changed for every check, so a Sprite overlap tested against 10 other sprites will have the overlapX/Y values updated 10 times in a single collision pass, so you can only safely use the values in the callback ( #641 )
2014-09-01 03:54:55 +01:00
photonstorm
7fc37751b2
ScaleManager.orientationSprite has been removed because it never displayed correctly anyway (it would be distorted by the game scale), it will be bought back in a future version by way of a custom orientation state.
2014-09-01 03:30:02 +01:00
photonstorm
8fec5169f0
Added Sound._muteVolume which stops Firefox and IE9 crashing if you try to unmute a sound that hasn't yet been muted, which can also happen as a result of a game visibility change (thanks @osmanzeki #1108 #1123 )
2014-09-01 03:13:05 +01:00
photonstorm
80d1df4705
ScaleManager.setMinMax(minWidth, minHeight, maxWidth, maxHeight) is a handy function to allow you to set all the min/max dimensions in one call.
2014-09-01 03:07:17 +01:00
photonstorm
fe9dbd15e5
The World bounds can now be set to any size, including smaller than the game dimensions. Before it was locked to a minimum size of the game canvas, but it can now be anything.
2014-09-01 02:41:07 +01:00
photonstorm
1a60d641b1
Canvas.removeFromDOM(canvas) will remove a canvas element from the DOM.
...
Game.destroy now removes the games canvas element from the DOM.
2014-09-01 02:38:21 +01:00
photonstorm
97d771c4e8
ScaleManager has a new scaleMode called RESIZE
which will tell Phaser to track the size of the parent container (either a dom element or the browser window if none given) and set the canvas size to match it. If the parent changes size the canvas will resize as well, keeping a 1:1 pixel ratio. There is also a new ScaleManager.setResizeCallback method which will let you define your own function to handle resize events from the game, such as re-positioning sprites for a fluid responsive layout ( #642 )
...
The width and height given to the Phaser.Game constructor can now be numbers or strings in which case the value is treated as a percentage. For example a value of "100%" for the width and height will tell Phaser to size the game to match the parent container dimensions exactly (or the browser window if no parent is given). Equally a size of "50%" would tell it to be half the size of the parent. The values are retained even through resize events, allowing it to maintain a percentage size based on the parent even as it updates.
2014-09-01 01:52:04 +01:00
photonstorm
5fb8c7eb85
ScaleManager window.resize handler would constantly dispatch enterPortrait and enterLandscape events on window resizing, regardless if it actually entered that orientation or not.
...
Stage.offset has been moved to ScaleManager.offset
Stage.bounds has been removed, you can access it via Stage.getBounds.
Stage.checkOffsetInterval has been moved to ScaleManager.trackParentInterval
ScaleManager.hasResized signal has been removed. Use ScaleManager.setResizeCallback instead.
2014-09-01 01:02:48 +01:00
photonstorm
e3f11d5aba
change log update.
2014-08-31 00:21:47 +01:00
photonstorm
92386221e4
Tile.setCollision now adjusts the tiles interesting faces list as well, this allows you to create one-way jump tiles without using custom callbacks on a specific tile basis (thanks @RafaelOliveira #886 )
2014-08-29 18:03:32 +01:00
photonstorm
5546e5903c
Tiled polylines are now imported into the map objects property as well as map collision ( #1117 )
2014-08-29 16:56:30 +01:00
photonstorm
0284d0b98c
If Time.elapsed was > Time.timeCap it would reset the elapsed value to be 1 / 60. It's now set to Time.timeCap and Time.timeCap defaults to 1 / 60 * 1000
as it's a ms value (thanks @casensiom #899 )
2014-08-29 16:37:57 +01:00
photonstorm
10e7d8ff7e
TilemapParser.getEmptyData now correct adds an empty bodies array into layers. This fixes an issue where p2 couldn't convert a csv map into collision tiles (thanks @sru #845 )
2014-08-29 16:30:29 +01:00
photonstorm
719b81c6e3
GamepadButton.justPressed and justReleased now correctly report if the button has just been pressed or released (thanks @padpadpad #1019 )
2014-08-29 16:08:38 +01:00
photonstorm
7b9c1a561e
GamePad and SinglePad onAxisCallback parameters have changed. You are now sent: this (a reference to the SinglePad that caused the callback), the axis index and the axis value in that order.
...
GamePad axis detection now works again properly in Firefox (#1035 )
2014-08-29 15:55:05 +01:00
photonstorm
32119e9892
Animation.onUpdate is a new event that is dispatched each time the animation frame changes. Due to its intensive nature it is disabled by default. Enable it with Animation.enableUpdate = true
( #902 )
2014-08-29 14:30:44 +01:00
photonstorm
9055fc7e01
The Pointer move callbacks are now sent an extra parameter: fromClick
allowing your callbacks to distinguish between the Pointer just moving, or moving as a result of being pressed down (thanks @iforce2d #1055 )
2014-08-29 14:19:47 +01:00
photonstorm
26a55bd202
SoundManager.destroy is a new method that will destroy all current sounds and reset any callbacks.
...
StateManager.clearCurrentState now handles the process of clearing down the current state and is now called if the Game is destroyed.
Game.destroy now clears the current state, activating its shutdown callback if it had one. It also now destroys the SoundManager, stopping any currently running sounds (#1092 )
2014-08-29 11:37:47 +01:00
photonstorm
69b9e5eb7c
Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo #877 #1147 )
2014-08-29 01:28:43 +01:00
photonstorm
52ea95d9ce
Sound.restart used to cause the Sound to double-up if it was already playing when called. Now correctly stops the sound before restarting it (thanks @wombatbuddy #1136 )
2014-08-29 01:06:29 +01:00
photonstorm
dd9e7e6297
Pointer.dirty is a new boolean that is set by the InputHandler. It tells the Pointer to re-check all interactive objects it may be over on the next update, regardless if it has moved position or not. This helps solve issues where you may have a Button that on click generates a pop-up window that now obscures the Button (thanks @jflowers45 #882 )
2014-08-29 00:47:49 +01:00
photonstorm
6fbaa36ddd
P2.PointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
...
P2.InversePointProxy.mx and my values are get and set in meters with no pixel conversion taking place.
P2.PointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
P2.InversePointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
2014-08-28 17:04:58 +01:00
photonstorm
34426e7560
Loader.useXDomainRequest boolean automatically set to true
if the browser is specifically detected as IE9, but you can still override this. IE10 will use xhr.
2014-08-28 05:24:57 +01:00
photonstorm
9de1d494df
Phaser 2.1.0 build files for testing.
...
Ninja Physics is no longer included in the build files by default. Not enough people were using it, and not enough contributions were coming in to help polish it up, so we've saved the space and removed it. It's still available in the grunt build files if you require it, but we're deprecating it from the core library at this time. It will make a return in Phaser3 when we move to a modular class system.
2014-08-28 04:53:05 +01:00
photonstorm
4cdffb6b6f
Change log update.
2014-08-28 04:38:26 +01:00
photonstorm
2d4d1a050d
Tilemap.hasTile now checks the Tile.index value and will return false if the index is -1 (i.e. a non-active tile) (thanks @elgansayer #859 )
2014-08-28 04:30:13 +01:00
photonstorm
a7d9b2c8c5
The P2.World.postBroadphaseHandler now checks if the returned pairs array is empty or not before processing it (thanks @wayfu #934 )
2014-08-28 04:24:08 +01:00
photonstorm
0c88ba041a
If you used a single Game configuration object and didn't specify the enableDebug property it would crash on Debug.preUpdate (thanks @luizbills #1053 )
2014-08-28 04:19:10 +01:00
photonstorm
83619ba81e
InputHandler docs updated to avoid Pointer data-type confusion ( #1097 )
2014-08-28 04:07:24 +01:00
photonstorm
6216cf578c
BitmapFonts are now correctly added to the Cache._bitmapFont array and returned via Cache.getBitmapFont (thanks @prudolfs #1076 )
2014-08-28 03:52:26 +01:00
photonstorm
0f207c47a7
Calling P2.Body.destroy or ArcadePhysics.Body.destroy wouldn't null the parent sprite body, causing it to error in the next update (thanks @jonathanhooker #1077 )
2014-08-28 03:44:02 +01:00
photonstorm
ec687868de
Input.setMoveCallback has been removed due to deprecation.
...
BitmapData.refreshBuffer has been removed and replaced with BitmapData.update.
BitmapData.drawSprite has been removed due to deprecation. Use BitmapData.draw instead.
Pointer.moveCallback has been removed due to deprecation.
SinglePad.addButton has been removed due to deprecation.
P2.Body.loadData has been removed due to deprecation.
P2.World.defaultFriction and defaultRestitution have been removed due to deprecation.
Canvas.create noCocoon parameter has been removed due to deprecation.
Color.getColorInfo, RGBtoHexstring, RGBtoWebstring and colorToHexstring has been removed due to deprecation.
2014-08-28 03:40:59 +01:00
photonstorm
6e2cd37776
ScaleManager.destroy now removes the window and document event listeners, which are no longer created anonymously (thanks @eguneys #1092 )
...
Input.Gamepad.destroy now destroys all connected SinglePads and clears event listeners.
SinglePad.destroy now clears all associated GamepadButton objects and signals.
2014-08-28 03:31:47 +01:00
photonstorm
fa45d7feff
Events.onDestroy is a new signal that is dispatched whenever the parent is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
...
Group.onDestroy is a new signal that is dispatched whenever the Group is being destroyed. It's dispatched at the start of the destroy process, allowing you to perform any additional house cleaning needed (thanks @jonkelling #1084 )
2014-08-28 02:56:06 +01:00
photonstorm
6b4510f693
TileSprite now has the alive
property, which should help with some Group operations (thanks @jonkelling #1085 )
2014-08-28 02:36:30 +01:00
photonstorm
42c810b43f
Fixed the resolution uniform type in the SampleFilter (thanks @VictoryRice #1137 )
2014-08-28 02:20:49 +01:00
photonstorm
d7f8950758
Debug.cameraInfo no longer crashes if the camera bounds are nulled (thanks @wayfu #1143 )
...
Camera.setBoundsToWorld no longer crashes if the camera bounds are nulled (thanks @wayfu #1143 )
2014-08-28 02:13:51 +01:00
photonstorm
01db9257e0
Change log updates.
2014-08-28 02:06:48 +01:00
photonstorm
31f450dd42
Docs updates, preparing for Rope merge.
2014-08-28 01:59:10 +01:00
photonstorm
c76aa785f9
Documentation updates.
2014-08-28 01:57:38 +01:00
photonstorm
7772590b18
Docs update.
2014-08-28 01:44:48 +01:00
photonstorm
ccc8369f43
InputHandler.checkBoundsRect was incorrectly assigning a property in Sprites fixed to the camera being dragged left (thanks @CraigBeswetherick #1093 )
2014-08-28 01:29:23 +01:00
photonstorm
7bfa6fa9f2
Loader.useXDomainRequest boolean added. If true
(the default is false
) it will use XDomainRequest when loading JSON files instead of xhr. In rare IE edge-cases this may be required. You'll know if you need it ( #1131 #1116 )
2014-08-28 01:23:45 +01:00
photonstorm
c87aa5103d
Fixed the RevoluteConstraint worldPivot and moved it to the end of the signature to minimise code changes.
2014-08-28 01:14:59 +01:00
photonstorm
aeb82dbee9
World.createRotationalSpring will now let you create rotational springs.
2014-08-28 00:58:50 +01:00
photonstorm
6acc8bf9f2
World.enableBodySleeping has been removed and replaced with World.sleepMode.
2014-08-28 00:45:57 +01:00
photonstorm
98ccae56de
P2.Body now uses the new Body.type value instead of Body.motionState, however as P2.Body already have a property called type
we have left the motionState
getter/setter in for now.
2014-08-28 00:39:47 +01:00
photonstorm
4935a4e4af
RevoluteConstraint fixed for new version of p2.
2014-08-28 00:24:56 +01:00
photonstorm
b25bdf3523
Fixed the DistanceConstraint parameters.
2014-08-28 00:15:28 +01:00
photonstorm
33c52eaf09
BitmapData alpha option added.
...
Pointer return type added.
pixi manifest updated to remove need for geom classes.
2014-08-27 21:26:29 +01:00
A.S. Lomoff
134068bada
return back misstyping
2014-08-27 17:35:26 +03:00
A.S. Lomoff
61e58f4e9a
fix TypeScript site URL
2014-08-27 17:34:31 +03:00
photonstorm
f887ee0df8
TypeScript definition updates to help fix for the noimplicitany
option (thanks @Waog #1088 )
2014-08-06 16:24:33 +01:00
Alvin
31c1423947
Merge pull request #1057 from steelywing/patch-2
...
add README.md index
2014-08-06 15:39:14 +02:00
photonstorm
36ecd81f29
Arcade Physics Body.skipQuadTree is a new boolean that if set to true
when you collide the Sprite against a Group it will tell Phaser to skip using a QuadTree for that collision. This is handy if this Body is especially large.
...
Arcade Physics World.skipQuadTree will disable the use of all QuadTrees in collision methods, which can help performance in tightly packed scenes.
2014-08-04 13:04:11 +01:00
photonstorm
06cb37247a
Updated readme.
2014-08-04 12:24:34 +01:00
photonstorm
aabdf6f97a
Resolves issue with pixel perfect click / over detection on Sprites that used trimmed image atlases for animations or frames > 0.
2014-08-01 17:46:51 +01:00
photonstorm
9bbc8ecce3
Phaser.Physics.P2.addPolygon now takes a nested array again (thanks @wayfu #1060 )
2014-07-31 13:39:26 +01:00
Wing
eb4d635046
add README.md index
2014-07-22 14:13:32 +08:00
photonstorm
122640e01b
Phaser.Loader was incorrectly getting the responseText from _xhr instead of _ajax on IE9 xDomainRequests (thanks @lardratboy #1050 )
2014-07-21 11:12:58 +01:00
photonstorm
8e7e6f05e1
Adding .0 :)
2014-07-18 13:12:08 +01:00
photonstorm
113b69a5d1
Preparing for 2.1 development work.
2014-07-18 13:09:21 +01:00
photonstorm
ee49575714
Preparing for master.
2014-07-18 12:35:16 +01:00
photonstorm
24527eac3e
Group.checkAll allows you to check if the same property exists across all children of the Group and is set to the given value (thanks @codevinsky #1013 )
...
Group.checkProperty allows you to check if the property exists on the given child of the Group and is set to the value specified (thanks @codevinsky #1013 )
Phaser.Utils.setProperty will set an Objects property regardless of depth (thanks @codevinsky #1013 )
Phaser.Utils.setProperty will set an Objects property regardless of depth (thanks @codevinsky #1013 )
Phaser.Utils.getProperty will get an Objects property regardless of depth (thanks @codevinsky #1013 )
2014-07-18 11:52:39 +01:00
photonstorm
883c11e377
BitmapData.resize fixed to update the crop property too, resolves issues with images getting cut off with BitmapData.load.
2014-07-18 03:33:17 +01:00
photonstorm
49bb45c42e
Tilemap.swap now accurately swaps from A to B and from B to A (thanks @noidexe #1034 )
2014-07-18 00:29:24 +01:00
photonstorm
82ef6d4aeb
If you add a Tween to the TweenManager and then immediately stop it, it will still exist in the TweenManager (thanks @gilangcp #1032 )
2014-07-16 19:50:58 +01:00
photonstorm
90eec97707
Animation.updateFrameData allows you to load a new FrameData object into an existing animation, even if currently running (based on #1029 )
...
AnimationManager.loadFrameData will now update all existing Animations to use the newly loaded FrameData (based on #1029 )
2014-07-16 00:55:12 +01:00
photonstorm
aaf82f9d3a
Sprite.loadTexture has a new optional stopAnimation
boolean parameter which will halt the currently running animation (if any) after changing the texture (based on #1029 ).
2014-07-16 00:29:43 +01:00
photonstorm
d72e199291
Physics.bounds now correctly matches World.bounds on system start (thanks @Dumtard #1028 )
2014-07-16 00:14:47 +01:00
photonstorm
afeeeecbe0
Keyboard.processKeyPress now checks if the Keyboard Input handler is disabled or not before processing the key callbacks.
2014-07-16 00:12:59 +01:00
photonstorm
d10dea27b0
Pixi updated worldTransform from an Array to an Object and Phaser Image, BitmapText, Text and Graphics were still using array access to populate the world property, giving it incorrect results (thanks @alvinsight)
2014-07-15 22:44:02 +01:00
photonstorm
538425193a
World.wrap when using the bounds of the object wouldn't adjust the bounds correctly, meaning wrapping outside the camera failed (thanks @jackrugile #1020 )
2014-07-15 14:22:24 +01:00
photonstorm
f78a527ad5
Prevented objects with pixel perfect checks from over-riding other higher priority ID items ( #983 )
...
Rebuilt the way items are polled for Pointer events (drag, click, move). Now faster and more efficient, especially when some items in the stack require pixel perfect checks.
2014-07-15 11:20:57 +01:00
photonstorm
2c421d27ce
GameObjectFactory.spriteBatch now lets you specify null
as a parameter for the parent and automatically adds the batch to game.world
as a result. Also fixed jsdocs issues (@petarov #1000 )
2014-07-14 12:56:05 +01:00
photonstorm
5bc482685b
Renaming the release :) #1004
2014-07-14 12:08:46 +01:00
photonstorm
bc9e5804b2
Updated docs.
2014-07-11 18:02:47 +01:00
photonstorm
0353ee12be
Reverting to a 2.0.7 release to fix the issues with Image / RetroText / Buttons.
2014-07-11 16:30:25 +01:00
photonstorm
74679922d1
Debug.preUpdate was still being called in the Game Loop even if enableDebug was set to false (thanks @qdrj, #995 )
2014-07-11 11:52:48 +01:00
photonstorm
d7bed24a27
Preparing for 2.1.0 build.
2014-07-10 23:14:29 +01:00
photonstorm
8421cfc400
Final readme updates.
2014-07-10 20:39:17 +01:00
photonstorm
d0727b9c04
ReadMe update.
2014-07-10 20:39:13 +01:00
photonstorm
d11d8051b1
You can now prevent the Debug class from being created or booted by using the Game configuration setting: enableDebug
. By default it is true
, set to false
to prevent the class from being created. Please note you are responsible for checking if this class exists before calling it, but you can do that via if (game.debug) { ... }
(request #984 )
2014-07-10 10:46:18 +01:00
photonstorm
a182598c65
Using a Game configuration object you can now specify the value of the preserveDrawingBuffer
flag for the WebGL renderer. By default this is disabled for performance reasons. But if you need to be able to take screen shots of your WebGL games using toDataUrl on the game canvas then you'll need to set this to true
( #987 )
2014-07-10 10:46:18 +01:00
photonstorm
494c33a9f4
Rectangle.randomX will return a random value located within the horizontal bounds of the Rectangle.
...
Rectangle.randomY will return a random value located within the vertical bounds of the Rectangle.
2014-07-09 11:34:18 +01:00
photonstorm
003403c832
Color.getWebRGB will now accept either an Object or numeric color value.
2014-07-09 11:15:24 +01:00
photonstorm
ca8c6e16e9
README updates.
2014-07-08 12:59:36 +01:00
photonstorm
0b2bea3564
Removed hasOwnProperty check from Tween.from because it breaks on extended or inherited Game Objects.
2014-07-08 12:59:36 +01:00
photonstorm
2a106473b4
Added more detail to the Tween docs.
2014-07-08 12:59:36 +01:00
photonstorm
2d676b00b4
Working through crop issues.
2014-07-08 12:59:36 +01:00
photonstorm
77d5be1d8e
When adding a new Animation to a Sprite it would incorrectly reset the current Sprite frame to the first frame of the animation sequence, it is now left un-touched until you call play
on the animation.
2014-07-08 12:59:35 +01:00
photonstorm
14109aeeb1
Animation.next will advance to the next frame in the animation, even if it's not currently playing. You can optionally define the number of frames to advance, but the default is 1. This is also aliased from the AnimationManager, so you can do Sprite.animations.next()
.
...
Animation.previous will rewind to the previous frame in the animation, even if it's not currently playing. You can optionally define the number of frames to rewind, but the default is 1. This is also aliased from the AnimationManager, so you can do `Sprite.animations.previous()`.
2014-07-03 16:23:36 +01:00
photonstorm
7c624f409f
Updated console.log and README.
2014-07-03 10:50:26 +01:00
photonstorm
177d51f238
Signal.removeAll now has a new context
parameter. If specified only listeners matching the given context are removed (thanks @lucbloom for the idea, #880 )
2014-07-03 02:22:11 +01:00
photonstorm
92dbabb2df
Camera.updateTarget has had a make-over and now is a lot smoother under certain conditions (thanks @tjkopena, fix #966 )
2014-07-03 02:09:53 +01:00
photonstorm
8c41f6cc10
Game.onBlur and Game.onFocus events are now dispatched regardless if Stage.disableVisibilityChange is true or false, so you can respond to these events without your game automatically pausing or resuming ( #911 )
2014-07-02 14:57:28 +01:00
photonstorm
2916f0413f
Group.bringToTop (and consequently Sprite.bringToTop) no longer removes the child from the InputManager if enabled (thanks @BinaryMoon, fix #928 )
...
Group.sendToBack (and consequently Sprite.sendToBack) no longer removes the child from the InputManager if enabled.
Group.add has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.addAt has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onAddedToGroup` event.
Group.remove has a new optional boolean parameter: `silent`. If set to `true` the child will not dispatch its `onRemovedFromGroup` event.
Group.removeBetween has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Group.removeAll has a new optional boolean parameter: `silent`. If set to `true` the children will not dispatch their `onRemovedFromGroup` events.
Internal child movements in Group (such as bringToTop) now uses the new `silent` parameter to avoid the child emitting incorrect Group addition and deletion events.
2014-07-02 14:04:14 +01:00
photonstorm
2cef655ed6
Calling Tween.stop from inside a Tween update callback would still cause the tween onComplete event to fire (thanks @eguneys, #924 )
2014-07-02 05:47:38 +01:00
photonstorm
5ee9245acf
Rectangle.right when set would set the new width to be Rectangle.x + the value given. However the value given should be a new Right coordinate, so the width calculation has been adjusted to compensate (thanks @cryptonomicon, #849 )
2014-07-02 05:37:12 +01:00
photonstorm
58fc73348c
The StateManager has a preRenderCallback option, which checks for a preRender function existing on the State, but it was never called. Have decided to add this in, so the core Game loop now calls state.preRender right before the renderer runs (thanks @AnderbergE #869 )
2014-07-02 05:32:40 +01:00
photonstorm
757136bf4f
Device.mobileSafari was no longer detecting Mobile Safari, now fixed (thanks @Zammy, #927 )
2014-07-01 19:19:49 +01:00
photonstorm
79bd7c400b
Key.duration wasn't set to zero after a Key.reset (thanks @DrHackenstein, #932 )
2014-07-01 16:57:55 +01:00
photonstorm
faa9af5539
readme updates
2014-07-01 16:19:20 +01:00
photonstorm
d2fc42520b
stopFullScreen has been changed to run against document instead of the canvas since the cancelFullScreen method is created on the document (thanks @j0hnskot, #863 )
2014-07-01 15:46:32 +01:00
photonstorm
8b9aec320b
Readme updates.
2014-07-01 15:46:32 +01:00
photonstorm
8c11ec1037
Updated readme.
2014-07-01 15:08:12 +01:00
photonstorm
181fd1ae56
Merged Pixi 1.5.4 with Phaser - all of the lovely new Pixi features are in, like complex Graphics objects and masking.
2014-07-01 15:03:46 +01:00
photonstorm
3d80568e4c
Loader.isLoading is set to false if the filelist size is zero.
2014-06-30 09:24:25 +01:00
photonstorm
692ca928f0
Updated docs.
2014-06-29 21:19:37 +01:00
photonstorm
3ebb13c4b0
PR updates
2014-06-24 00:10:54 +01:00
photonstorm
907ba55478
Huge number of gamepad updates to get it working properly on Chrome again. Firefox debugging tomorrow.
2014-06-11 04:25:30 +01:00
photonstorm
0587d944b3
Added PlayStation 3 controller button mappings to Phaser.Gamepad (thanks @wayfu #887 )
2014-06-11 00:25:58 +01:00
photonstorm
50e47d89ee
ArcadePhysics.Body.setSize if you set offset x/y values previously and then passed zero values they would be ignored (thanks @casensiom fix #889 )
2014-06-11 00:21:04 +01:00
photonstorm
e923e230e0
TilemapLayers can now be used with an unbounded camera (a camera that can move beyond the world boundaries). Currently, when an unbounded camera moves outside of the world, tilemaps start acting weird because they only render themselves strictly within the world limits. With this change, the tilemap will continue scrolling and show empty space beyond its edge (thanks @jotson #851 )
...
TilemapLayer.wrap property - if true the map is rendered as if it is on the surface of a toroid (donut) instead of a plane. This allows for games that seamlessly scroll from one edge to the opposite edge of the world without noticing the transition. Note that the World size must match the Map size (thanks @jotson #851 )
2014-06-11 00:15:02 +01:00
photonstorm
78c4e62cfe
BitmapData.getPixel fix for pixels with zero red value (thanks @lstor fix #894 )
...
If you call ArcadePhysics.collide on a Sprite vs. a Tilemap and provide a custom processCallback, the result was being ignored and the sprite was being separated regardless (thanks @aivins fix #891 #890 )
2014-06-11 00:02:06 +01:00
photonstorm
b979243a8d
Removed the cacheKey parameters from the AnimationParser methods as they're no longer used.
2014-06-10 23:50:12 +01:00
photonstorm
7c7d9153e6
Sprite.crop (and Image.crop) has been completely overhauled. You can now crop animated sprites (sprite sheet and texture atlas), you can define the x/y crop offset and the crop rectangle is exposed in the Sprite.cropRect property.
...
Sprite.updateCrop is available if you wish to update an externally referenced crop rectangle.
Sprites and Images now have their own textures objects, they are no longer references to those stored in the global Pixi.TextureCache. This allows you to redefine the texture frame dynamically without messing up any other Sprites in your game, such as via cropping. They still share global Base Textures, so image references are kept to a minimum.
Sprite.resetFrame will revert the Sprites texture frame back to its defaults dimensions. This is called when you call Sprite.crop with no rectangle, to reset the crop effect, but can be userful in other situations so we've left it as a public method.
2014-06-10 23:37:33 +01:00
photonstorm
6d10be6baa
When creating a Sprite or Image using a texture atlas it would set the frame twice, once in loadTexture and once when the initial frame is set. This has been reduced down to just a single setting now.
2014-06-10 11:21:07 +01:00
photonstorm
ee5f6457c8
Swapped to using escaped Unicode characters for the console output.
2014-06-09 16:15:41 +01:00
photonstorm
9aa10f7521
Sound.pause will no longer fire a Sound.onStop signal, and the pause values are set before the onPause signal is dispatched (thanks @AnderbergE, fix #868 )
2014-06-05 02:55:20 +01:00
photonstorm
369e2cc2d0
Sound.destroy(true) would call remove on the SoundManager, which in turn would throw a TypeError as it tried to remove the sound events twice (thanks @AnderbergE, fix #874 )
2014-06-05 02:50:53 +01:00
photonstorm
1c9e23f535
Emitter.start has a new parameter: forceQuantity which will force the quantity of a flow of particles to be the given value (request #853 )
...
Emitter.explode is a new short-cut for exploding a fixed quantity of particles at once.
Emitter.flow is a new short-cut for creating a flow of particles based on the given frequency.
2014-06-02 01:15:58 +01:00
photonstorm
12252944fa
Time.add allows you to add an existing Phaser.Timer to the timer pool (request #864 )
2014-06-02 00:54:42 +01:00
photonstorm
917c7491cd
Canvas.create has deprecated the noCocoon parameter as it's no longer required. The parameter is still in the signature, but no longer used in the method.
2014-05-30 02:03:07 +01:00
photonstorm
6e8694d5f7
A Canvas style set from a game config object used an incorrect property (thanks @TatumCreative, fix #861 )
2014-05-30 02:01:33 +01:00
photonstorm
edc1507b4e
Resolved issue where Cocoon won't render a scene in Canvas mode if there is only one Sprite/Image on it.
2014-05-29 23:52:13 +01:00
photonstorm
eee1183a6a
Forces use of a Canvas Renderer under CocoonJS automatically.
...
The SoundManager no longer requires a touch to unlock it, defaults to unlocked.
2014-05-29 23:17:18 +01:00
photonstorm
0c675f741f
Wrapped all events that CocoonJS doesn't support in conditional checks to avoid Cocoon Warnings.
2014-05-29 22:25:40 +01:00
photonstorm
5a42a41608
Updated the JSON format.
2014-05-29 17:25:20 +01:00
photonstorm
5b5bdc80d9
Loader.pack will allow you to load in a new Phaser Asset Pack JSON file. An Asset Pack is a specially structured file that allows you to define all assets for your game in an external file. The file can be split into sections, allowing you to control loading a specific set of files from it. An example JSON file can be found in the resources
folder and examples of use in the Phaser Examples repository.
...
Loader.totalQueuedPacks returns the number of Asset Packs in the queue.
Loader.totalLoadedPacks returns the number of Asset Packs already loaded.
2014-05-29 17:05:13 +01:00
photonstorm
066ab633a6
Loader.tilemap has renamed the mapURL
parameter to url
and mapData
to data
to keep it consistent with the other Loader methods.
...
Loader.physics has renamed the `dataURL` parameter to `url` and `jsonData` to `data` to keep it consistent with the other Loader methods.
2014-05-29 04:44:23 +01:00
photonstorm
af1508de8f
BitmapData.addToWorld will create a new Phaser.Image object, assign the BitmapData to be its texture, add it to the world then return it.
...
BitmapData.copyPixels now accepts a Sprite, Image, BitmapData, HTMLImage or string as its source.
2014-05-29 03:30:21 +01:00
photonstorm
2219e6f1c9
Timer.ms would report the game time ms value if the Timer hadn't yet been started, instead of 0.
...
Timer.seconds would report the game time value if the Timer hadn't yet been started, instead of 0.
2014-05-28 23:27:26 +01:00
photonstorm
0c76e9aada
Sprite animation data wasn't reset when going from a sprite sheet to a single frame in Sprite.loadTexture (thanks @lucbloom, fix #850 )
2014-05-27 14:23:41 +01:00
photonstorm
5a0d5b4887
RetroFont now uses Phaser.scaleModes.NEAREST by default for its RenderTexture to preserve scaling.
2014-05-27 13:36:38 +01:00
photonstorm
cdde45a292
Phaser.RenderTexture incorrectly passed the scaleMode to Pixi.RenderTexture, causing the renderer to error.
2014-05-27 13:35:47 +01:00
photonstorm
9c35dfde0c
ArcadePhysics.Body has a new boolean property enable
. If false
the body won't be checked for any collision or overlaps, or have its pre or post update methods called. Use this for easy toggling of physics bodies without having to destroy or re-create the Body object itself.
2014-05-27 11:22:58 +01:00
photonstorm
5b9bd96583
RetroFont.updateOffset allows you to modify the offsetX/Y values used by the font during rendering.
2014-05-27 05:23:34 +01:00
photonstorm
890d90af4d
Keyboard.addCallbacks now has a new parameter for keypress event capture.
...
Keyboard.pressEvent stores the most recent DOM keypress event.
Keyboard.processKeyDown now runs the callback after all the objects have been created and/or updated.
Keyboard.processKeyUp now runs the callback after all the objects have been created and/or updated.
Phaser.Keyboard.lastChar will return the string value of the last key pressed.
Phaser.Keyboard.lastKey will return the most recently pressed Key object.
2014-05-27 04:26:37 +01:00
photonstorm
68f1bbd9a5
RetroFont charsPerRow paramters is now optional. If not given it will take the image width and divide it by the characterWidth value.
2014-05-27 04:26:23 +01:00
photonstorm
f007a77f3d
Fixed Gamepad issue that incorrectly checked non-webkit prefix gamepads.
2014-05-26 22:02:53 +01:00
photonstorm
86c228d380
Group.destroy now removes any set filters (thanks @Jmaharman fix #844 )
2014-05-26 20:13:00 +01:00
photonstorm
c5d9f12858
BitmapData.alphaMask has 2 new optional parameters: sourceRect and maskRect to give more fine-grained control over where the source and mask are drawn and their size
...
BitmapData.draw now has two optional parameters: width and height, to let you stretch the image being drawn if needed.
2014-05-24 03:58:00 +01:00
photonstorm
7846da7c90
BitmapData.alphaMask 'mask' parameter is now optional, if not given it will use itself as the mask.
...
BitmapData.alphaMask now calls BitmapData.update after running.
2014-05-24 03:17:58 +01:00
photonstorm
6e9c9c10b8
BitmapData.alphaMask can now also take a Phaser.Sprite, Phaser.Image or BitmapData object as a source type.
...
BitmapData.alphaMask has 4 new optional parameters: x, y, x2 and y2 to control exactly where the source and mask images are drawn.
2014-05-24 03:15:13 +01:00
photonstorm
f3ef3aed19
BitmapData.draw can now take a BitmapData object as a source type.
2014-05-24 02:43:59 +01:00
photonstorm
934f6a816c
BitmapData.resize now properly updates the baseTexture and texture dimensions.
2014-05-24 02:02:49 +01:00
photonstorm
7b696dddfe
BitmapData.extract has 4 new parameters: r2, g2, b2, a2 which let you re-color the extract pixels as they are drawn to the new BitmapData.
...
BitmapData.load will take a game object or string and resize the BitmapData to match it and then draw the pixels in.
2014-05-24 01:29:47 +01:00
photonstorm
bcddfc83c0
Sprite.alive property now explicitly defined on the Sprite prototype (thanks @lewster32, #841 )
2014-05-21 21:48:29 +01:00
photonstorm
2a73652ed8
Preparing for 2.0.6 "Jornhill" development.
2014-05-20 10:56:45 +01:00
photonstorm
560a44f06e
README fixes for 2.0.5 release.
2014-05-20 10:37:51 +01:00
photonstorm
43e079a53a
Readme update.
2014-05-20 10:31:55 +01:00
photonstorm
8f07796af3
2.0.5 readme updates.
2014-05-20 10:03:02 +01:00
photonstorm
7b876d5fc4
ScaleManager.bounds is a Rectangle object that holds the exact size of the game canvas, taking DOM offset and game scale into account.
...
Pointer.withinGame is now accurate based on game scale and updated as the Pointer moves.
Stage.bounds is now updated if the game canvas offset changes position. Note that it gives the un-scaled game dimensions.
2014-05-19 18:49:59 +01:00
photonstorm
c9656e48de
Group.hasProperty fixed to not use hasOwnProperty, but a series of in
checks (thanks @mgiuffrida for the idea, #829 )
2014-05-19 13:11:58 +01:00
photonstorm
1a7305b0ad
New movement data added for a Pointer Locked mouse (Pointer.movementX/Y) (thanks @woutercommandeur, #831 )
2014-05-19 11:51:25 +01:00
photonstorm
da75a22e82
Cache.checkKey added - allows you to pass in a Cache type and a key and return a boolean.
...
Cache.checkCanvasKey(key) - Check if a Canvas key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextureKey(key) - Check if a Texture key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkSoundKey(key) - Check if a Sound key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTextKey(key) - Check if a Text key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkPhysicsKey(key) - Check if a Physics key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkTilemapKey(key) - Check if a Tilemap key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBinaryKey(key) - Check if a Binary key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapDataKey(key) - Check if a BitmapData key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkBitmapFontKey(key) - Check if a BitmapFont key exists in the cache (thanks to @delta11 for the proposal)
Cache.checkJSONKey(key) - Check if a JSON key exists in the cache (thanks to @delta11 for the proposal)
2014-05-19 11:34:14 +01:00
photonstorm
cfadaf3e70
Tilemap.layer is a getter/setter to the current layer object (which can be changed with Tilemap.setLayer)
2014-05-15 22:30:32 +01:00
photonstorm
1d13855abb
Tilemap.searchTileIndex allows you to search for the first tile matching the given index, with optional skip and reverse parameters.
2014-05-15 19:56:56 +01:00
photonstorm
2650e6c47e
RetroFont.text would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
...
RenderTexture.resize would throw WebGL errors due to an issue with Pixi.RenderTexture. Fixed in Phaser and submitted code to Pixi.
2014-05-15 15:32:59 +01:00
Richard Davey
21011c3d03
mouseout handler
2014-05-14 22:56:42 +01:00
photonstorm
5d8a11ae29
Input.addMoveCallback allows you to bind as many callbacks as you like to the DOM move events (Input.setMoveCallback is now flagged as deprecated)
...
Input.deleteMoveCallback will remove a previously set movement event callback.
2014-05-14 03:01:24 +01:00
photonstorm
b90bcc442c
If an object was drag enabled with bringToTop, the onDragStop event wouldn't fire until the mouse was next moved (thanks @alpera, fix #813 )
2014-05-14 02:42:55 +01:00
photonstorm
cc9a234c8c
Color.getRGB would return incorrect color components if a color value without alpha was given, now works with both 0xRRGGBB and 0xAARRGGBB.
...
Color.getWebRGB now works regardless if you give an 0xRRGGBB or 0xAARRGGBB color value.
2014-05-14 02:09:44 +01:00
photonstorm
798d7a4fd1
Stage.backgroundColor now properly accepts hex #RRGGBB and color values 0xRRGGBB again ( fix #785 )
2014-05-14 01:59:21 +01:00
photonstorm
0bfa249ed5
Key.justPressed and justReleased incorrectly set the delay value to 2500ms. Now defaults to 50ms (thanks @draklaw, fix #797 )
2014-05-14 00:24:09 +01:00
photonstorm
8d8c3cb595
The Tiled JSON parser will now include Tiled polygons, ellipse and rectangle geometry objects in the resulting map data (thanks @tigermonkey, #791 )
2014-05-14 00:10:08 +01:00
photonstorm
b2c68c1369
Graphics.drawTriangles will draw an array of vertices to the Graphics object (thanks @codevinsky, #795 )
...
Polygon.area will calculate the area of the Polygon (thanks @codevinsky, #795 )
2014-05-14 00:04:31 +01:00
photonstorm
6f1ba28b73
README updates.
2014-05-13 23:43:44 +01:00
photonstorm
5047606118
Button.onOverMouseOnly is a boolean that causes onOver events to fire only if the pointer was a mouse (i.e. stops onOver sounds triggering on touch)
2014-05-13 23:43:44 +01:00
photonstorm
0d2fa2733a
Timer class updated so that code-resumed pauses don't mess up the internal _pausedTotal value (thanks @joelrobichaud, fix #814 )
...
Timer class when paused by code after a game-level pause wouldn't set the codepaused flag (thanks @joelrobichaud, fix #814 )
2014-05-09 16:41:48 +01:00
photonstorm
86f6b114e8
Sound.stop on Samsung S4 would randomly throw a DOM error. Wrapped the audio stop in a try/catch (thanks FSDaniel)
2014-05-09 16:39:45 +01:00
photonstorm
c32706f98c
Phaser.Utils.transposeArray will transpose the given array and return it.
...
Phaser.Utils.rotateArray will rotate the given array by 90 or 180 degrees in either direction and return it.
2014-05-08 02:17:37 +01:00
photonstorm
5eb7ae2cb0
Plugins moved to their own new repo.
2014-05-08 01:57:21 +01:00
photonstorm
410bc389ed
Tidying up ready to move the plugins to their own repo.
2014-05-08 01:57:21 +01:00
photonstorm
041bbd430c
Tilemap.getTile has a new nonNull parameter. If true it won't return null
for empty tiles, but will return the actual Tile in that location.
2014-05-07 01:30:48 +01:00
photonstorm
6070bc63bc
Sound.play now returns the Sound object (thanks @AnderbergE, fix #802 )
2014-05-07 00:12:41 +01:00
photonstorm
91f8f96a76
TilemapWalker allows you to set a location marker into a tilemap. You can then move around with commands such as moveForward, turnLeft, etc.
...
New consts: Phaser.Tilemap.NORTH, SOUTH, EAST and WEST to use with the TileMapWalker Plugin.
2014-05-07 00:10:48 +01:00
photonstorm
2b40c8a7c7
Pointer.type and Pointer.exists properties added.
...
QuadTree.retrieve can now accept either a Sprite with a physics body or a Phaser.Rectangle as its parameter.
ArcadePhysics.getObjectsUnderPointer will return all children from a Group that overlap with the given Pointer.
2014-05-06 02:45:10 +01:00
photonstorm
ad7e2aff1f
Input.getPointerFromId will return a pointer with a matching pointerId value, if any. pointerId is a value set by the browser in the DOM event.
2014-05-02 12:21:57 +01:00
photonstorm
842abb82d3
Pointer.pointerId added which is set by the DOM event (if present in the browser). Note that browsers can and do recycle pointer IDs.
2014-05-02 12:14:05 +01:00
photonstorm
f38ccf9afe
Phaser.Tween.from allows you to set tween properties that will end up where the current object is (thanks @codevinsky, #792 )
2014-05-01 23:51:21 +01:00
photonstorm
4466b3cd5d
Input.getPointerFromIdentifier docs update to reflect where the identifier comes from. Pointer properties now set to give it fixed defaults (thanks @JirkaDellOro, #793 )
2014-05-01 23:35:40 +01:00
photonstorm
3f51721131
Readme updates.
2014-05-01 11:45:40 +01:00
photonstorm
a01b8f2387
Doc updates.
2014-05-01 02:42:06 +01:00
photonstorm
a7fe3a5346
Line.pointOnLine corrected algorithm (thanks @woutercommandeur, fix #784 )
2014-04-30 11:57:52 +01:00
photonstorm
046707bc92
Merge branch 'origin/master'
2014-04-29 22:58:44 +01:00
photonstorm
dad90a6bdd
readme update.
2014-04-29 22:36:46 +01:00
photonstorm
55dc748953
Tilemap.getTile and getTileXY used to return null
in 2.0.3 but returned a Tile object in 2.0.4 (with an index of -1), they now return null
again.
2014-04-29 21:28:14 +01:00
photonstorm
fa613c5fe1
ScaleManager seeds _check private var with null to avoid later comparison check (thanks @jflowers45, fix #782 )
...
P2.Body.applyForce should have used pxmi instead of pxm (thanks @Trufi, fix #776 )
P2 fixed creation of RevoluteConstraint by passing maxForce in the options (thanks @woutercommandeur, fix #783 )
2014-04-29 19:34:38 +01:00
photonstorm
eb86f612b3
Prep for 2.0.5 development.
2014-04-29 16:25:10 +01:00
photonstorm
75a848f0ef
Loader now uses XDomainRequest in IE9 to load JSON data to help with CORS issues.
2014-04-29 14:41:26 +01:00
photonstorm
9135b05ff7
readme updates
2014-04-29 04:04:24 +01:00
photonstorm
2449c71331
readme updates.
2014-04-29 03:50:33 +01:00
photonstorm
8fc33506f1
Tidying the readme.
2014-04-29 03:49:12 +01:00
photonstorm
90cb20cc11
readme updates.
2014-04-29 03:28:11 +01:00
photonstorm
010c2de41b
Updated readme for 2.0.4 release.
2014-04-29 03:18:13 +01:00
photonstorm
1d37cde66f
Updated p2 to latest build and patched for Float32Array + UMD issues.
2014-04-29 02:34:16 +01:00
photonstorm
06c69951c1
New Phaser Project Template specifically for requireJS in the resources/Project Templates
folder (many thanks @ashatch)
2014-04-29 02:14:13 +01:00
photonstorm
b32312dca5
Animation.setFrame allows you to set the animation to a specific frame (thanks @adamholdenyall, #706 )
2014-04-28 23:35:08 +01:00
photonstorm
74108148ac
CSV Tilemap tiles would incorrectly set the Tile layer reference, causing collision to fail (thanks @Chapelin, fix #692 )
2014-04-28 23:21:57 +01:00
photonstorm
57775e9e86
Fixed Timer issue where pausing then restarting could add to the duration of running manual timers ( fix #759 )
2014-04-28 22:08:13 +01:00
photonstorm
a5cbd8f2a6
Fixed an issue where Sounds that had been paused via game code would un-mute if the game paused and resumed.
2014-04-28 20:30:47 +01:00
photonstorm
e85bbf8bc5
Text.updateText now sets the lineCap to round
to avoid occassional font glitching issues in Chrome.
2014-04-28 15:17:47 +01:00
photonstorm
360d744472
Camera.unfollow allows you to easily unfollow a tracked object (thanks @alvinsight, #755 )
2014-04-28 14:56:48 +01:00
photonstorm
8812d20162
Testing some small time tweaks.
2014-04-28 14:52:09 +01:00
photonstorm
e9436293a8
Tilemap.addTilesetImage will now raise a console.warn if you specify an invalid tileset key and not create the tileset rather than pick the default set.
2014-04-28 13:47:27 +01:00
photonstorm
348e3c14bd
LoaderParser.bitmapFont updated so xml parsing works properly on IE9 (thanks @georgiee)
2014-04-28 13:35:30 +01:00
photonstorm
838027a93b
Timer.timeCap is a new setting allowing your Timers to protect against unexpectedly large delta timers.
2014-04-28 13:22:29 +01:00
photonstorm
de9fc08e7d
Color.updateColor - updates an existing color object to update the rgba property.
...
Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel, you can optionally set the saturation and value amounts.
Color.HSLColorWheel will return an array with 360 color objects for each segment of an HSL color wheel, you can optionally set the saturation and lightness amounts.
2014-04-28 04:19:26 +01:00
photonstorm
27d62aa147
Color.HSVColorWheel will return an array with 360 color objects for each segment of an HSV color wheel.
2014-04-28 03:25:45 +01:00
photonstorm
65022ccc55
Blank Tilemaps no longer create null
tiles, but instead create Tile objects with an index of -1 which can be replaced and updated like any other tile.
...
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:42:38 +01:00
photonstorm
b1153299c0
Tilemap.fill would throw an error if called on a blank tilemap full of null values (thanks @DrHackenstein, fix #761 )
2014-04-28 02:23:07 +01:00
photonstorm
3f23b3dc52
Fixed issue where Animations resuming from a pause would skip frames (thanks @merixstudio, fix #730 )
2014-04-28 01:48:46 +01:00
photonstorm
1d48b3c5f2
Your State can now have a pauseUpdate method, which is called constantly when the game is paused.
...
The Input system is now updated even while the game is paused.
2014-04-28 00:07:40 +01:00
photonstorm
6e5415fc31
Point.interpolate - Interpolates the two given Points, based on the f
value (between 0 and 1) and returns a new Point.
2014-04-27 11:16:06 +01:00
photonstorm
8dd67ea6ec
Point.dot - get the dot product of two Point objects.
...
Point.cross - get the cross product of two Point objects.
Point.cross - get the cross product of two Point objects.
Point.perp - make the Point perpendicular (90 degrees rotation)
Point.rperp - make the Point perpendicular (-90 degrees rotation)
Point.normalRightHand - Right-hand normalize (make unit length) a Point.
Point.angle - Returns the angle between this Point object and another object with public x and y properties.
Point.angleSq - Returns the angle squared between this Point object and another object with public x and y properties.
Point.getMagnitudeSq - Calculates the length squared of the Point object.
Point.project - Project two Points onto another Point.
Point.projectUnit - Project two Points onto a Point of unit length.
Point.multiplyAdd - Adds two 2D Points together and multiplies the result by the given scalar.
Point.negative - Creates a negative Point.
2014-04-27 11:09:57 +01:00
photonstorm
7a64f53006
Fixed Polygon.contains for coordinates to the left of the polygon (thanks @vilcans, fix #766 )
2014-04-27 09:56:29 +01:00
photonstorm
2cba2a0e2b
Point.dot - get the dot product of two Point objects.
...
Point.cross - get the cross product of two Point objects.
Point.cross - get the cross product of two Point objects.
Point.perp - make the Point perpendicular (90 degrees rotation)
Point.rperp - make the Point perpendicular (-90 degrees rotation)
2014-04-26 20:35:31 +01:00
photonstorm
b6c2b4e0bf
Updated to [Pixi.js 1.5.3]( https://github.com/GoodBoyDigital/pixi.js/releases/tag/v1.5.3 )
2014-04-25 16:55:09 +01:00
photonstorm
54b71ddc23
Phaser.ArrayList is a new iterative object, similar in principal to a linked list but operating on a single array without modifying the object structure.
...
Input and Pointer now use the new ArrayList instead of a LinkedList, which resolve list item removable during callback issues.
Input.reset no longer resets every interactive item it knows of, because they are removed during the destroy phase and can now persist between States if needed.
2014-04-25 15:11:54 +01:00
photonstorm
11ca2deaf6
Finally - fully working setHSL and shiftHSL.
2014-04-25 02:45:35 +01:00
photonstorm
387ff4f0fa
BitmapData.processPixelRGB lets you perform a custom callback on every pixel in the BitmapData.
2014-04-24 05:20:45 +01:00
photonstorm
c88fa2bd91
Loads of BitmapData updates. More details soon.
2014-04-24 03:49:49 +01:00
photonstorm
0f1e0a3d4e
Updated the Device little / big endianess check.
2014-04-23 23:35:36 +01:00
photonstorm
b6cc150a15
Game.scratch is a single handy BitmapData instance that can be used as a visual scratch-pad, for off-screen bitmap manipulation (and is used as such by BitmapData itself).
...
Updated TS defs.
2014-04-23 22:14:47 +01:00
photonstorm
87bcb6677d
Group.classType allows you to change the type of object that Group.create or createMultiple makes to your own custom class.
2014-04-23 21:49:58 +01:00
photonstorm
4ec5665148
Fixed #750 - Invalid typescript mapping for TileSprite.autoScroll function in TS defs.
...
Game checks if window.console exists before using it (should fix IE9 issues when dev tools are closed), however it is still used deeper in Pixi.
Body.loadData flagged as deprecated.
2014-04-22 23:31:07 +01:00
photonstorm
944e03ddb8
P2.Body.loadPolygon has been updated to correct center of mass issues (thanks @georgiee, fix #749 )
2014-04-22 22:33:25 +01:00
photonstorm
06878407e8
RandomDataGenerator.integerInRange uses a new method of rounding the value to an integer to avoid distribution probability issues (thanks PhaserFan)
2014-04-22 11:01:15 +01:00
photonstorm
e4887c8177
If Tween.yoyo was true but repeat was 0 then it wouldn't yoyo. Now if yoyo is set, but not repeat, the repeat count gets set to 1 (thanks @hilts-vaughan, fix #744 )
2014-04-22 02:12:21 +01:00
photonstorm
6ace9e6031
Made jsdocs clear that Point.set/setTo 2nd parameter is optional ( fix #743 )
2014-04-22 02:02:56 +01:00
photonstorm
f3922002a1
Circle.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745 )
...
Point.distance used an incorrect Math call if you wanted a rounded distance value (thanks @OpherV, fix #745 )
2014-04-22 01:52:24 +01:00
photonstorm
0b1fb5a637
Destroying an object with an input handler during its onDown event would throw Signals dispatch errors (thanks @jflowers45, fix #746 )
...
InputHandler._setHandCursor private var wasn't properly set, meaning the hand cursor could sometimes remain (during destroy sequence for example)
All Game Objects have a new property: destroyPhase (boolean) which is true if the object is in the process of being destroyed, otherwise false.
The PIXI.AbstractFilter is now included in the Phaser Pixi build by default, allowing for easier use of external Pixi Filters.
2014-04-22 01:43:22 +01:00
Richard Davey
bf10cfa58f
Added ghosting info to Keyboard docs.
2014-04-20 01:57:32 +01:00
Richard Davey
e033ec9e86
The Emitter no longer checks minParticleScale = maxParticleScale, allowing for fixed scale particles again
2014-04-20 01:57:32 +01:00
photonstorm
3e6a88fff6
Group.remove now checks the child to see if it's a member of the root Group before removing it, otherwise Pixi throws an Error.
2014-04-17 12:47:36 +01:00
photonstorm
713bd203ee
ArcadePhysics.collideSpriteVsGroup checks if Sprite has a body before carrying on, now safely skips sub-groups or other non-Sprite group children.
...
QuadTree.retrieve now checks to see if the given Sprite has a body before carrying on.
2014-04-17 12:31:14 +01:00
photonstorm
ce592d48bf
Group.destroy checks parent before removing (thanks @clark-stevenson, fix #733 )
2014-04-17 12:18:39 +01:00
photonstorm
7c9f079ce5
Group.setProperty will now check if the property exists before setting it, this applies to Group.setAll and anything else using setProperty internally.
2014-04-17 12:11:37 +01:00
photonstorm
b77c034f61
World.wrap will take a game object and if its x/y coordinates fall outside of the world bounds it will be repositioned on the opposite side, for a wrap-around effect.
2014-04-16 22:59:19 +01:00
photonstorm
089dfbb960
Group.resetCursor will reset the Group cursor back to the start of the group, or to the given index value.
2014-04-16 21:39:04 +01:00
photonstorm
5f455791d4
TypeScript defs update (thanks @cheshirepuss42, ping to @clark-stevenson to ensure merge with his master version :)
2014-04-15 03:24:54 +01:00
photonstorm
3b73c17997
ArcadePhysics.Body.phase is checked in postUpdate to prevent it from being called multiple times in a single frame.
2014-04-15 02:50:25 +01:00
photonstorm
1164bf85ac
Line.angle and Math.angleBetween used Math.atan2 arguments in the wrong order (thanks @jotson, fix #724 )
2014-04-15 02:12:33 +01:00
photonstorm
eeff786eb2
StateManager.restart incorrectly skipped the first additional parameter after clearCache (thanks @mariusbrn, fix #722 )
2014-04-14 23:34:13 +01:00
photonstorm
25a93cf4af
AnimationManager.play will now call Animation.stop on the current animation before switching to the new one (thanks @nihakue, #713 )
2014-04-14 23:29:09 +01:00
photonstorm
5d0ea6453b
AnimationManager.destroy now iterates through child animations calling destroy on all of them, avoiding a memory leak (thanks stauzs)
...
Animation.destroy didn't correctly clear the onStart, onLoop and onComplete signals.
2014-04-14 22:53:05 +01:00
photonstorm
a7f6165e39
InputManager.resetLocked - If the Input Manager has been reset locked then all calls made to InputManager.reset, such as from a State change, are ignored.
...
Keyboard.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
Key.reset has a new `hard` parameter which controls the severity of the reset. A soft reset doesn't remove any callbacks or event listeners.
2014-04-14 21:53:08 +01:00
photonstorm
055cb8058d
Device.crosswalk detects if your game is running under Intels Crosswalk XDK.
2014-04-14 16:40:14 +01:00
photonstorm
e9cb345261
P2.World.convertTilemap now correctly checks the collides parameter of the tiles as it converts them.
2014-04-14 13:52:53 +01:00
photonstorm
f70e4d7d90
Fixed the use of the destroy parameter in Group.removeAll and related functions (thanks @AnderbergE, fix #717 )
2014-04-14 12:57:29 +01:00
photonstorm
f33ba5dcc7
Timer has removed all use of local temporary vars in the core update loop.
...
Timer.clearPendingEvents will purge any events marked for deletion, this is run automatically at the start of the update loop.
The main Timer loop could incorrectly remove TimeEvent if a new one was added specifically during an event callback (thanks @garyyeap, fix #710 )
2014-04-14 11:51:50 +01:00
photonstorm
0d15350755
Preparing for 2.0.4 development.
2014-04-11 14:29:38 +01:00
photonstorm
cdff873cf7
Updated change log and readme headers.
2014-04-11 13:28:17 +01:00
photonstorm
7b2c3e8e0f
Updated header styles in readme.
2014-04-11 13:15:41 +01:00
photonstorm
4cea8d7bcc
Preparing for final 2.0.3 release. Updated docs, readme and build files.
2014-04-11 13:09:28 +01:00
photonstorm
a2b2d558a5
jsdoc and jshint fixes.
2014-04-11 03:02:19 +01:00
photonstorm
3d7ca639c3
Fixed the vectors used in the BlurX and BlurY filters (thanks @nickryall, fix #668 )
2014-04-11 01:01:47 +01:00
photonstorm
77f8e5eefc
P2 Fixtures Collection Class (@georgiee please test it works ok! #704 )
2014-04-11 00:43:30 +01:00
photonstorm
3a1c202e24
jsdoc fixes for SignalBindings.
2014-04-11 00:19:37 +01:00
photonstorm
a01cc2e1ca
Objects with an InputHandler now deactivate it when the object is removed from a Group but not destroyed ( fix #672 )
...
Lots of jsdoc fixes in Body and World.
Removed un-used events from World (such as onImpact).
2014-04-11 00:06:22 +01:00
photonstorm
9ddcc5d0ea
p2.World.defaultRestitution has been deprecated and is now p2.World.restitution.
...
p2.World.defaultFriction has been deprecated and is now p2.World.friction.
p2.World now uses 4 bodies for the world boundaries, rather than 1 body with 4 shapes. This helps the broadphase massively.
p2.World bounds are now included in the callback events such as beginContact and impact events.
2014-04-10 17:11:16 +01:00
photonstorm
780fb48ab3
P2.World has a new contactMaterial property, which can be configured like a normal P2 Contact Material and is applied when two bodies hit that don't have defined materials.
2014-04-10 14:51:20 +01:00
photonstorm
78aa24f04b
Emitter.setScale now allows you to scale the x and y axis of the particles independently.
2014-04-10 05:18:06 +01:00
photonstorm
c8ca3d1809
Emitter now calls the Phaser.Particle.onEmit function, which is left empty for you to override and add in custom behaviours.
2014-04-10 01:37:10 +01:00
photonstorm
95b0532f59
Emitter.setScale has a new 'rate' parameter which allows particles to change in scale over time, using any Easing value or timescale.
...
Emitter.setAlpha has a new 'rate' parameter which allows particles to change alpha over time, using any Easing value or timescale.
Emitter.bringToTop and Emitter.sendToBack are booleans that let you optionally set the display order of the Particle when emitted.
2014-04-10 01:36:05 +01:00
photonstorm
770ced8ac1
Group.customSort allows you to sort the Group children based on your own sort function.
2014-04-10 00:56:53 +01:00
photonstorm
be52515ed4
PluginManager parent parameter removed as it's redundant. Also most core functions tidied up and jsdocs fixed.
2014-04-09 16:12:25 +01:00
photonstorm
50981fd729
Emitter now has minParticleAlpha and maxParticleAlpha values for setting a random alpha on emitted particles.
...
Emitter.particleAnchor allows you to control the anchor of emitted Particles. Defaults to 0.5 (same as before) but now under your control.
Emitter now emits Phaser.Particle objects instead of Phaser.Sprites, which can be extended as required.
Emitter has had various local properties removed that were already declared in Phaser.Group which it extends.
2014-04-09 14:29:23 +01:00
photonstorm
73d0414672
Grunt update to dev dependencies (thanks @xtian, #695 )
2014-04-09 12:23:17 +01:00
photonstorm
b9cb2417b6
Group.removeBetween now properly iterates through the children.
2014-04-09 03:19:36 +01:00
photonstorm
01ccbd97c0
Key.enabled boolean allows you to toggle if a Key processes its update method or dispatches any events without deleting and re-creating it.
2014-04-09 02:29:41 +01:00
photonstorm
e764be430e
Emitter.minParticleScale and maxParticleScale wasn't resetting the Body size correctly.
2014-04-09 00:59:53 +01:00
photonstorm
8fc2a465cd
New Phaser package, small docs updates and preparing P2.World for new bounds code and v0.5.0 migration.
2014-04-08 03:31:13 +01:00
photonstorm
01eec6cef5
Keyboard.stop nulls the function references after removing the event listeners (thanks @bmceldowney, #691 )
2014-04-07 12:29:26 +01:00
photonstorm
bf32590cfe
Fixed a few jsdoc errors.
2014-04-07 12:29:26 +01:00
photonstorm
38d722c1e5
Tilemap.removeTile(x, y, layer) lets you remove the tile at the given coordinates and updates the collision data.
...
Tilemap.removeTileWorldXY lets you remove the tile at the given pixel value coordinates and updates the collision data.
If you pass `null` to Tilemap.putTile as the tile parameter it will pass the call over to Tilemap.removeTile.
2014-04-01 13:36:42 +01:00
photonstorm
61429d8467
StateManager.restart allows you to quickly restart the *current* state, optionally clearing the world and cache.
2014-04-01 11:25:04 +01:00
photonstorm
a4ed94e039
Key.reset now clears any callbacks associated with the onDown and onUp events and nulls the onHoldCallback if set. Key.reset is called by Keyboard.reset when changing state.
2014-04-01 04:41:43 +01:00
photonstorm
439cefd481
ArcadePhysics.Body.hitTest(x, y) will return a boolean based on if the given world coordinate are within the Body or not.
...
Fixed jsdoc method tags in Body.
2014-04-01 03:54:20 +01:00
photonstorm
03b80887f2
SoundManager.removeByKey(key) will remove all sounds from the SoundManager that have a key matching the given value.
2014-04-01 03:42:30 +01:00
photonstorm
3728f25d68
SoundManager.remove(sound) now lets you remove a sound from the SoundManager, destroying it in the process.
...
Sound.destroy will remove a sound and all local references it holds, optionally removing itself from the SoundManager as well.
2014-04-01 03:38:13 +01:00
photonstorm
1f32ef721d
The Phaser Gruntfile is now split up into option tasks (thanks @xtian, #638 )
2014-04-01 01:47:42 +01:00
photonstorm
5ed79dfefe
The Phaser jshint process is now running on Travis (thanks @xtian, #656 )
2014-04-01 01:24:49 +01:00
photonstorm
5559fea0f8
The State.update function (and thus the update of any sub-classed Sprites or other objects) is now called before Stage, Tweens, Sound, Input, etc ( #662 )
2014-04-01 01:01:15 +01:00
photonstorm
0198a77fe6
Phaser.Point.centroid static function added to calculate the centroid or midpoint of an array of points (thanks @lewster32, #675 )
2014-04-01 00:42:13 +01:00
photonstorm
e3f1c7b21c
Added Pointer.positionUp which records the last point at which the pointer left the screen / was raised (thanks @Cryszon ,#676)
2014-04-01 00:40:26 +01:00
photonstorm
3f8911d95f
SoundManager.boot will check to see if the AudioContext was created before carrying on (thanks @keyle, fix #669 )
2014-03-31 11:22:44 +01:00