@crispcode/shimmer 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/scripts/shimmer.js +3 -2
package/package.json
CHANGED
package/scripts/shimmer.js
CHANGED
@@ -59,11 +59,12 @@ export class Shimmer extends Component {
|
|
59
59
|
/**
|
60
60
|
* This method preloads a colection of assets
|
61
61
|
* @param {Object} bundle A collection of assets
|
62
|
+
* @param {Function} progress A callback to track progress
|
62
63
|
* @return {Promise} A promise which is resolved upon loading the assets. It resolves the loaded resources.
|
63
64
|
*/
|
64
|
-
preload ( bundle ) {
|
65
|
+
preload ( bundle, progress = () =>{} ) {
|
65
66
|
Assets.addBundle( 'bundle', bundle )
|
66
|
-
return Assets.loadBundle( 'bundle' )
|
67
|
+
return Assets.loadBundle( 'bundle', progress )
|
67
68
|
}
|
68
69
|
|
69
70
|
/**
|