@crispcode/shimmer 5.2.0 → 5.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
/**
|