mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Swapped to using Number.MAX_VALUE
so repeat -1 now works properly in IE11 and below.
This commit is contained in:
parent
86fe054c63
commit
d46662cd46
7 changed files with 9 additions and 9 deletions
|
@ -282,8 +282,8 @@ var Path = new Class({
|
|||
if (out === undefined) { out = new Rectangle(); }
|
||||
if (accuracy === undefined) { accuracy = 16; }
|
||||
|
||||
out.x = Number.MAX_SAFE_INTEGER;
|
||||
out.y = Number.MAX_SAFE_INTEGER;
|
||||
out.x = Number.MAX_VALUE;
|
||||
out.y = Number.MAX_VALUE;
|
||||
|
||||
var bounds = new Rectangle();
|
||||
var maxRight = Number.MIN_SAFE_INTEGER;
|
||||
|
|
|
@ -180,7 +180,7 @@ var Animation = new Class({
|
|||
var anim = this.currentAnim;
|
||||
|
||||
// Should give us 9,007,199,254,740,991 safe repeats
|
||||
this.repeatCounter = (this._repeat === -1) ? Number.MAX_SAFE_INTEGER : this._repeat;
|
||||
this.repeatCounter = (this._repeat === -1) ? Number.MAX_VALUE : this._repeat;
|
||||
|
||||
anim.getFirstTick(this);
|
||||
|
||||
|
|
|
@ -28,8 +28,8 @@ var FromPoints = function (points, out)
|
|||
return out;
|
||||
}
|
||||
|
||||
var minX = Number.MAX_SAFE_INTEGER;
|
||||
var minY = Number.MAX_SAFE_INTEGER;
|
||||
var minX = Number.MAX_VALUE;
|
||||
var minY = Number.MAX_VALUE;
|
||||
|
||||
var maxX = Number.MIN_SAFE_INTEGER;
|
||||
var maxY = Number.MIN_SAFE_INTEGER;
|
||||
|
|
|
@ -204,7 +204,7 @@ var World = new Class({
|
|||
{
|
||||
var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });
|
||||
|
||||
graphic.setZ(Number.MAX_SAFE_INTEGER);
|
||||
graphic.setZ(Number.MAX_VALUE);
|
||||
|
||||
this.debugGraphic = graphic;
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ var Closest = function (source)
|
|||
{
|
||||
var bodies = this.tree.all();
|
||||
|
||||
var min = Number.MAX_SAFE_INTEGER;
|
||||
var min = Number.MAX_VALUE;
|
||||
var closest = null;
|
||||
var x = source.x;
|
||||
var y = source.y;
|
||||
|
|
|
@ -218,7 +218,7 @@ var World = new Class({
|
|||
{
|
||||
var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });
|
||||
|
||||
graphic.setZ(Number.MAX_SAFE_INTEGER);
|
||||
graphic.setZ(Number.MAX_VALUE);
|
||||
|
||||
this.debugGraphic = graphic;
|
||||
|
||||
|
|
|
@ -223,7 +223,7 @@ var World = new Class({
|
|||
{
|
||||
var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 });
|
||||
|
||||
graphic.setZ(Number.MAX_SAFE_INTEGER);
|
||||
graphic.setZ(Number.MAX_VALUE);
|
||||
|
||||
this.debugGraphic = graphic;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue