resource-loader
Advanced tools
Comparing version 1.5.0 to 1.5.1
{ | ||
"name": "resource-loader", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"main": "./src/index.js", | ||
@@ -5,0 +5,0 @@ "description": "A generic asset loader, made with web games in mind.", |
@@ -428,3 +428,3 @@ var EventEmitter = require('eventemitter3'), | ||
Resource.prototype._onProgress = function (event) { | ||
if (event.lengthComputable) { | ||
if (event && event.lengthComputable) { | ||
this.emit('progress', this, event.loaded / event.total); | ||
@@ -707,3 +707,3 @@ } | ||
* @static | ||
* @param extname {string} The extension to set the type for, e.g. ".png" or ".fnt" | ||
* @param extname {string} The extension to set the type for, e.g. "png" or "fnt" | ||
* @param loadType {Resource.LOAD_TYPE} The load type to set it to. | ||
@@ -715,2 +715,9 @@ */ | ||
/** | ||
* Sets the load type to be used for a specific extension. | ||
* | ||
* @static | ||
* @param extname {string} The extension to set the type for, e.g. "png" or "fnt" | ||
* @param xhrType {Resource.XHR_RESPONSE_TYPE} The xhr type to set it to. | ||
*/ | ||
Resource.setExtensionXhrType = function (extname, xhrType) { | ||
@@ -717,0 +724,0 @@ setExtMap(Resource._xhrTypeMap, extname, xhrType); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
59443
1354