Commit graph

921 commits

Author SHA1 Message Date
photonstorm
9f6b7b49e5 Particles.Arcade.Emitter.makeParticles now checks the given quantity value against Emitter.maxParticles. If quantity is more than maxParticles then the maxParticles value is used instead. 2015-01-05 11:22:07 +00:00
Richard Davey
a2c4cafa70 Update readme. 2015-01-04 12:38:52 +00:00
photonstorm
af15b9b4e7 Line.reflect will calculate the reflected, or outgoing angle of the line and a given line if they intersect. This can be used for Body vs. Line collision responses and rebounds.
Line.normalX and Line.normalY contain the x and y components of the left-hand normal of the line.
Line.fromAngle will sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`.
2015-01-04 05:11:19 +00:00
Richard Davey
1ceec8ec27 Added Code of Conduct. 2015-01-03 01:31:42 +00:00
Richard Davey
d3f913f415 Docs update. 2015-01-03 00:31:48 +00:00
Richard Davey
b3f322469b Added Events.onEnterBounds to the destroy method (thanks @legendary-mich #1497) 2015-01-02 21:53:20 +00:00
photonstorm
15d5b54c26 Removed redundant updateTransform call. 2015-01-02 04:15:27 +00:00
photonstorm
c1eb456ed2 Mouse.mouseMoveCallback is flagged as deprecated. 2015-01-02 04:14:44 +00:00
photonstorm
b22233a0bc docs update and sound marker check. 2015-01-02 04:14:44 +00:00
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