Skip to content

Commit d1f75ce

Browse files
author
Andrew Start
committed
Merge branch 'dev'
2 parents a0c2a73 + 925d9ce commit d1f75ce

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

bin/pixi.dev.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (c) 2012-2014, Mat Groves
55
* http://goodboydigital.com/
66
*
7-
* Compiled: 2014-12-15
7+
* Compiled: 2015-01-16
88
*
99
* pixi.js is licensed under the MIT License.
1010
* http://www.opensource.org/licenses/mit-license.php
@@ -16794,7 +16794,7 @@ var _formatQueryString = function(data, query) {
1679416794
PIXI.buildPath = function(src, _basePath, data) {
1679516795
if(src.indexOf('data:') === 0)
1679616796
return src;
16797-
if (_basePath !== null) {
16797+
if (_basePath !== null && src.indexOf(_basePath) === -1) {
1679816798
var match = _parseURI(src);
1679916799
// IE 7,8 Return empty string here.
1680016800
if (match[1] === null || match[1] === '') {
@@ -17123,7 +17123,11 @@ PIXI.AssetLoader.prototype.load = function()
1712317123

1712417124
//if not, assume it's a file URI
1712517125
if (!fileType)
17126-
fileType = fileName.split('?').shift().split('.').pop().toLowerCase();
17126+
{
17127+
fileType = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
17128+
if(fileType.indexOf('?') !== -1)
17129+
fileType = fileType.substring(0, fileType.indexOf('?'));
17130+
}
1712717131

1712817132
var Constructor = PIXI.AssetLoader.loadersByType[fileType];
1712917133
if(!Constructor)
@@ -17207,8 +17211,8 @@ PIXI.JsonLoader = function (url, crossorigin, baseUrl) {
1720717211
*/
1720817212
this.loaded = false;
1720917213
this.versioning = null;
17210-
if(url.lastIndexOf('?') !== -1)
17211-
this.versioning = url.substring(url.indexOf('?'));
17214+
if(url.lastIndexOf('?') > url.lastIndexOf('.'))
17215+
this.versioning = url.substring(url.lastIndexOf('?'));
1721217216
};
1721317217

1721417218
// constructor
@@ -17849,7 +17853,7 @@ PIXI.BitmapFontLoader = function(url, crossorigin, baseUrl)
1784917853

1785017854

1785117855
this.versioning = null;
17852-
if(url.lastIndexOf('?') !== -1)
17856+
if(url.lastIndexOf('?') > url.lastIndexOf('.'))
1785317857
this.versioning = url.substring(url.indexOf('?'));
1785417858

1785517859
this._loadFails = 0;

bin/pixi.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/pixi/loaders/AssetLoader.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,11 @@ PIXI.AssetLoader.prototype.load = function()
133133

134134
//if not, assume it's a file URI
135135
if (!fileType)
136-
fileType = fileName.split('?').shift().split('.').pop().toLowerCase();
136+
{
137+
fileType = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
138+
if(fileType.indexOf('?') !== -1)
139+
fileType = fileType.substring(0, fileType.indexOf('?'));
140+
}
137141

138142
var Constructor = PIXI.AssetLoader.loadersByType[fileType];
139143
if(!Constructor)

src/pixi/loaders/BitmapFontLoader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ PIXI.BitmapFontLoader = function(url, crossorigin, baseUrl)
5252

5353

5454
this.versioning = null;
55-
if(url.lastIndexOf('?') !== -1)
55+
if(url.lastIndexOf('?') > url.lastIndexOf('.'))
5656
this.versioning = url.substring(url.indexOf('?'));
5757

5858
this._loadFails = 0;

src/pixi/loaders/JsonLoader.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ PIXI.JsonLoader = function (url, crossorigin, baseUrl) {
5050
*/
5151
this.loaded = false;
5252
this.versioning = null;
53-
if(url.lastIndexOf('?') !== -1)
54-
this.versioning = url.substring(url.indexOf('?'));
53+
if(url.lastIndexOf('?') > url.lastIndexOf('.'))
54+
this.versioning = url.substring(url.lastIndexOf('?'));
5555
};
5656

5757
// constructor

src/pixi/loaders/LoaderUtils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ var _formatQueryString = function(data, query) {
1919
PIXI.buildPath = function(src, _basePath, data) {
2020
if(src.indexOf('data:') === 0)
2121
return src;
22-
if (_basePath !== null) {
22+
if (_basePath !== null && src.indexOf(_basePath) === -1) {
2323
var match = _parseURI(src);
2424
// IE 7,8 Return empty string here.
2525
if (match[1] === null || match[1] === '') {

0 commit comments

Comments
 (0)