Skip to content

Commit 6483b61

Browse files
committed
Tween.generateData would enter an eternal loop if the total resulted in a float. Now wrapped in Math.floor.
1 parent 6651f6c commit 6483b61

5 files changed

Lines changed: 14 additions & 83 deletions

File tree

README.md

Lines changed: 9 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
![Phaser 2.0](http://www.phaser.io/images/phaser2-github.png)
22

3-
Phaser 2.0.1
3+
Phaser 2.0.2
44
============
55

66
Phaser is a fast, free and fun open source game framework for making desktop and mobile browser HTML5 games. It uses [Pixi.js](https://github.com/GoodBoyDigital/pixi.js/) internally for fast 2D Canvas and WebGL rendering.
77

8-
Version: 2.0.1 "Lyrelle" - Released: 24th March 2014
8+
Version: 2.0.2 "Ghealdan" - Released: -in active development-
99

1010
By Richard Davey, [Photon Storm](http://www.photonstorm.com)
1111

@@ -22,14 +22,9 @@ By Richard Davey, [Photon Storm](http://www.photonstorm.com)
2222
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/photonstorm/phaser/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
2323

2424

25-
What's new in 2.0.1?
25+
What's new in 2.0.2?
2626
--------------------
2727

28-
The 2.0.1 release of Phaser is mostly a maintenance release. With 2.0 being such a significant upgrade there were bound to be some issues, and this release addresses them. One of the core things a lot of you kept telling us was that you need Arcade Physics to work pretty much *exactly* as it did in the past. So in 2.0.1 we've taken ArcadePhysics back another iteration, fixed a few of the most common complaints you had with it, and fixed every single physics example as well.
29-
30-
2.0.1 also brings the TypeScript definitions virtually bang up to date, covering P2 and Ninja physics, Arcade updates and more. Our thanks to Clarke for his continued support of these.
31-
32-
There are a few new features as well including a Phaser export script for PhysicsEditor (found in the `resources` folder), updates to the Particle Emitter and device enhancements. As always if you find a bug that you can confirm with a test case, please report it to us via github. If you think you may have found a bug, but aren't quite sure, please post it to the forum first.
3328

3429

3530
Welcome to Phaser
@@ -63,85 +58,21 @@ There is also an [un-official Getting Started Guide](http://www.antonoffplus.com
6358
Change Log
6459
----------
6560

66-
Version 2.0.1 - "Lyrelle" - 24th March 2014
61+
Version 2.0.2 - "Ghealdan" - -in active development-
6762

6863
Bug Fixes
6964

70-
* The Static, Kinematic and Dynamic consts that P2.Body uses were incorrect (fixes #563)
71-
* Sprite.destroy would fail if it had an Arcade Physics body, now added.
72-
* Group.getAt comparison updated (fixes #578)
73-
* Fixed the IE11 version check (fixes #579)
74-
* Ninja world collision to check right and bottom bounds (thanks dreadhorse, fix #571)
75-
* Group enableBody parameter was incorrectly assigned to the debug var (thanks BurnedToast, fix #565)
76-
* Fixed Tile callback check in Arcade Physics (fix #562)
77-
* Removed the examples build script from the Gruntfile (fix #592)
78-
* The P2 World wouldn't clear down fully on a State change, now properly clears out contacts, resets the bitmask, etc.
79-
* Button.onInputUpHandler wouldn't set an upFrame for a frame ID of zero, made the check more strict.
80-
* Fixed the Loader.preloadSprite crop effect on WebGL.
81-
* Fixed Grunt script that stopped the P2 constraint classes from building properly.
82-
* World.destroy incorrectly clashed with the Group.destroy method it over-rode, renamed to World.shutdown and updated StateManager accordingly.
83-
* World.shutdown now removes all children iteratively, calling destroy on each one, ultimately performing a soft reset of the World.
84-
* Objects with a scale.x or y of 0 are no longer considered valid for input (fix #602)
85-
* InputHandler will set the browser pointer back to default if destroyed while over (fix #602)
86-
* ArcadePhysics.separate doesn't pass over to seperateX/Y if overlapOnly is true (fix #604)
87-
* ArcadePhysics.collideSpriteVsSprite checks if both objects have bodies before processing.
88-
* Debug.spriteBounds will now take the position of the camera into consideration when rendering the bounds (fix #603)
89-
* InputHandler.dragFromCenter will now work regardless of the anchor point of the Sprite (fix #600)
90-
* Emitter.friction property removed and replaced with Emitter.particleDrag, which is now correctly applied.
91-
* ArcadePhysics.Body.reset incorrectly set the Body.rotation to Sprite.rotation instead of angle.
92-
* Emitter.emitParticle resets the rotation on the particle to zero before emitting it.
93-
* If no seed was given in the Game config object, the RandomDataGenerator wouldn't be started (thank tylerjhutchison fix #619)
94-
* p2 revolute pivots were wrongly signed (thanks georgiee, fix #621)
95-
* P2.Body.loadPolygon no longer modifies the Cache array (fix #613)
96-
* The volume given in Sound.play now over-rides that set in Sound.addMarker if specified (fix #623)
97-
* BitmapDatas when used as Game Object textures in WebGL now update themselves properly.
98-
* Timer.ms now correctly reports the ms time even if the Timer has been paused (thanks Nambew, fix #624)
99-
* If you added a Tileset to an empty map it would eventually throw an out of memory error.
100-
* Timer objects incorrectly set the first tick value on events if you added the events prior to starting them.
65+
* Tween.generateData would enter an eternal loop if the total resulted in a float. Now wrapped in Math.floor.
10166

10267

10368
Updated
10469

105-
* Updated Device.isConsoleOpen as it no longer works in Chrome. Revised code and documentation accordingly (fix #593)
106-
* Removed State.destroy empty method and replaced with State.shutdown, as that is what the StateManager expects (fix #586)
107-
* P2.removeBody will check if the body is part of the world before removing, this avoids a TypeError from the p2 layer.
108-
* Tilemap.createFromObjects has a new parameter: adjustY, which is true by default. Because Tiled uses a bottom-left coordinate system Phaser used to set the Sprite anchor to 0,1 to compensate. If adjustY is true it now reduces the y value by the object height instead.
109-
* Swapped the order of the _pollGamepads gamepads check, to stop the Chrome 'webkitGamepads is deprecated' error in the console.
110-
* Lots of TypeScript definitions updates (thanks as always to clark for these)
111-
* Removed Device.patchAndroidClearRectBug as it's no longer used internally.
112-
* Math.wrapAngle now supports radians (thanks Cryszon, #597)
113-
* Group.replace will now return the old child, the one that was replaced in the Group.
114-
* Group.destroy has a new parameter: `soft`. A soft destruction won't remove the Group from its parent or null game references. Default is `false`.
115-
* InputHandler.validForInput is a new method that checks if the handler and its owner should be considered for Pointer input handling or not.
116-
* ArcadePhysics.Body now checks the ArcadePhysics.World bounds, not the game bounds.
117-
* ArcadePhysics.Body has reverted to the 1.1.3 method of preUpdate, so you can now position sprites with x/y, drag them, etc, regardless of the Body.moves flag (issue #606)
118-
* ArcadePhysics.World now has setBounds and setBoundsToWorld methods, which are called automatically on world resizing.
119-
* ArcadePhysics.Body no longer sets the offset to match the anchor.
120-
* The StateManager is now responsible for clearing down input, timers, tweens, physics, camera and the World display list.
121-
* Removed the use of Int16Array from all Game Objects, swapped for standard Array. Phaser now runs on Android 2.x and IE9 again (fix #590)
122-
* When creating a Sprite (via Group.create or directly) with exists = false and a P2 body, the body is not added to the world.
123-
* Every Input class now checks to see if it has already been started. If so it doesn't add the listeners again unless they have been nulled.
124-
* Lots of fixes to the TypeScript definitions file (thanks as always to clark-stevenson for his tireless work on these)
125-
* Emitters now bring the particle they are about to emit to the top of the Group before doing so. Avoids particles hidden behind others.
126-
* ArcadePhysics.Body.setSize corrected to take the parameters as positive, not negative values.
127-
* ArcadePhysics.World.seperate will now check gravity totals to determine separation order. You can set World.forceX to true to always separate on X first and skip this check.
128-
* TileSprites now emit outOfBounds and enterBounds events accordingly.
129-
* You can now create multiple blank layers in a Tilemap.
70+
* The Build your First Phaser Game Tutorial has been updated for Phaser 2.x
13071

13172

13273
New Features
13374

134-
* Device.getUserMedia boolean added, useful if you need access to the webcam or microphone.
135-
* Math.removeRandom allows you to remove (and return) a random object from an array.
136-
* ArcadePhysics.World now has a checkCollision object which can be used to toggle collision against the 4 walls of its bounds.
137-
* Sprite.events.onEnterBounds added. This is dispatched if the Sprite leaves the bounds but then returns. The opposite of onOutOfBounds.
138-
* Timer.removeAll will remove and clear down all events, but keeps the Timer running.
139-
* Group.setAllChildren recursively checks if its children are Groups, and if so recursively applies the value to their children as well (feature #589)
140-
* Time.deltaCap lets you set a cap for the delta timer. It defaults to zero (which is disabled). If you use ArcadePhysics it gets set to 0.2, but you can modify as needed.
141-
* ArcadePhysics.Body has a deltaMax object, which allows you to cap the delta applied to the position to +- this value.
142-
* ArcadePhysics.Body now checks the Sprite scale automatically and adjusts the body size accordingly (fix #608)
143-
* Emitter.particleClass can now be set to any object that extends Phaser.Sprite, which will be emitted instead of a regular Sprite.
144-
* There is a brand new PhysicsEditor export script specifically for Phaser (in the resources folder), and new p2 polygon parsing functions thanks to georgiee.
75+
* n/a
14576

14677

14778
There is an extensive [Migration Guide](https://github.com/photonstorm/phaser/blob/master/resources/Migration%20Guide.md) available for those converting from Phaser 1.x to 2.x. In the guide we detail the API breaking changes and approach to our new physics system.
@@ -184,11 +115,11 @@ CDNJS
184115

185116
Thanks to a community member Phaser is now available on [CDNJS](http://cdnjs.com). You can include the following in your html:
186117

187-
`http://cdnjs.cloudflare.com/ajax/libs/phaser/2.0.1/phaser.min.js`
118+
`http://cdnjs.cloudflare.com/ajax/libs/phaser/2.0.2/phaser.min.js`
188119

189120
Or if you prefer you can leave the protocol off, so it works via http and https:
190121

191-
`//cdnjs.cloudflare.com/ajax/libs/phaser/2.0.1/phaser.min.js`
122+
`//cdnjs.cloudflare.com/ajax/libs/phaser/2.0.2/phaser.min.js`
192123

193124

194125
Requirements

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "phaser",
3-
"version": "2.0.1",
3+
"version": "2.0.2",
44
"homepage": "http://phaser.io",
55
"authors": [
66
"photonstorm <rich@photonstorm.com>"

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Phaser",
3-
"version": "2.0.1",
4-
"release": "Lyrelle",
3+
"version": "2.0.2",
4+
"release": "Ghealdan",
55
"description": "A fast, free and fun HTML5 Game Framework for Desktop and Mobile web browsers.",
66
"author": "Richard Davey",
77
"logo": "https://raw.github.com/photonstorm/phaser/master/phaser-logo-small.png",

src/Phaser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
var Phaser = Phaser || {
1111

1212
VERSION: '<%= version %>',
13-
DEV_VERSION: '2.0.1',
13+
DEV_VERSION: '2.0.2',
1414
GAMES: [],
1515

1616
AUTO: 0,

src/tween/Tween.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ Phaser.Tween.prototype = {
349349

350350
// Simulate the tween. We will run for frameRate * (this._duration / 1000) (ms)
351351
var time = 0;
352-
var total = frameRate * (this._duration / 1000);
352+
var total = Math.floor(frameRate * (this._duration / 1000));
353353
var tick = this._duration / total;
354354

355355
var output = [];

0 commit comments

Comments
 (0)