Fixed IE issues, added polyfill for Math.sign
@@ -1,7 +1,10 @@
1
1
//<DOC> <category> Image
2
2
//<DOC> <function> Constructor: new image(urlToImage, subImages = 1, subImagesPerRow = 1)
3
function image(url, subImgTotal = 1, perRow = 1)
3
function image(url, subImgTotal, perRow)
4
4
{
5
subImgTotal = subImgTotal || 1;
6
perRow = perRow || 1;
7
5
8
//<DOC> <parameter> image.subImages<br><br>The total number of subimages in the image. Defaults to 1.
6
9
this.subImages = subImgTotal;
7
10
//<DOC> <parameter> image.subImagesPerRow<br><br>The total number of subimages per row. Defaults to 1.
@@ -1,7 +1,10 @@1
//<DOC> <category> Image1
//<DOC> <category> Image2
//<DOC> <function> Constructor: new image(urlToImage, subImages = 1, subImagesPerRow = 1)2
//<DOC> <function> Constructor: new image(urlToImage, subImages = 1, subImagesPerRow = 1)3
function image(url, subImgTotal = 1, perRow = 1)3
function image(url, subImgTotal, perRow)4
{4
{5
subImgTotal = subImgTotal || 1;6
perRow = perRow || 1;7
5
//<DOC> <parameter> image.subImages<br><br>The total number of subimages in the image. Defaults to 1.8
//<DOC> <parameter> image.subImages<br><br>The total number of subimages in the image. Defaults to 1.6
this.subImages = subImgTotal;9
this.subImages = subImgTotal;7
//<DOC> <parameter> image.subImagesPerRow<br><br>The total number of subimages per row. Defaults to 1.10
//<DOC> <parameter> image.subImagesPerRow<br><br>The total number of subimages per row. Defaults to 1.@@ -0,0 +1,9 @@
1
if (!Math.sign) {
2
Math.sign = function(x) {
3
x = +x; // convert to a number
4
if (x === 0 || isNaN(x)) {
5
return Number(x);
6
}
7
return x > 0 ? 1 : -1;
8
};
9
}
@@ -0,0 +1,9 @@1
if (!Math.sign) {2
Math.sign = function(x) {3
x = +x; // convert to a number4
if (x === 0 || isNaN(x)) {5
return Number(x);6
}7
return x > 0 ? 1 : -1;8
};9
}@@ -569,8 +569,11 @@ Math.clamp = function(number, min, max)
569
569
570
570
//<DOC> <category> Image
571
571
//<DOC> <function> Constructor: new image(urlToImage, subImages = 1, subImagesPerRow = 1)
572
function image(url, subImgTotal = 1, perRow = 1)
572
function image(url, subImgTotal, perRow)
573
573
{
574
subImgTotal = subImgTotal || 1;
575
perRow = perRow || 1;
576
574
577
//<DOC> <parameter> image.subImages<br><br>The total number of subimages in the image. Defaults to 1.
575
578
this.subImages = subImgTotal;
576
579
//<DOC> <parameter> image.subImagesPerRow<br><br>The total number of subimages per row. Defaults to 1.
@@ -1154,6 +1157,16 @@ var GameObject =
1154
1157
}
1155
1158
}
1156
1159
1160
if (!Math.sign) {
1161
Math.sign = function(x) {
1162
x = +x; // convert to a number
1163
if (x === 0 || isNaN(x)) {
1164
return Number(x);
1165
}
1166
return x > 0 ? 1 : -1;
1167
};
1168
}
1169
1157
1170
// Basic event listeners, modeled after Phaser Signals
1158
1171
1159
1172
function signal()
@@ -569,8 +569,11 @@ Math.clamp = function(number, min, max)569
569
570
//<DOC> <category> Image570
//<DOC> <category> Image571
//<DOC> <function> Constructor: new image(urlToImage, subImages = 1, subImagesPerRow = 1)571
//<DOC> <function> Constructor: new image(urlToImage, subImages = 1, subImagesPerRow = 1)572
function image(url, subImgTotal = 1, perRow = 1)572
function image(url, subImgTotal, perRow)573
{573
{574
subImgTotal = subImgTotal || 1;575
perRow = perRow || 1;576
574
//<DOC> <parameter> image.subImages<br><br>The total number of subimages in the image. Defaults to 1.577
//<DOC> <parameter> image.subImages<br><br>The total number of subimages in the image. Defaults to 1.575
this.subImages = subImgTotal;578
this.subImages = subImgTotal;576
//<DOC> <parameter> image.subImagesPerRow<br><br>The total number of subimages per row. Defaults to 1.579
//<DOC> <parameter> image.subImagesPerRow<br><br>The total number of subimages per row. Defaults to 1.@@ -1154,6 +1157,16 @@ var GameObject =1154
}1157
}1155
} 1158
} 1156
1159
1160
if (!Math.sign) {1161
Math.sign = function(x) {1162
x = +x; // convert to a number1163
if (x === 0 || isNaN(x)) {1164
return Number(x);1165
}1166
return x > 0 ? 1 : -1;1167
};1168
} 1169
1157
// Basic event listeners, modeled after Phaser Signals1170
// Basic event listeners, modeled after Phaser Signals1158
1171
1159
function signal()1172
function signal()@@ -21,3 +21,5 @@
21
21
2017-02-03 16:28
22
22
2017-02-03 16:29
23
23
21:33
24
22:35
25
22:39
@@ -21,3 +21,5 @@21
2017-02-03 16:28 21
2017-02-03 16:28 22
2017-02-03 16:29 22
2017-02-03 16:29 23
21:33 23
21:33 24
22:35 25
22:39