@urso/core 0.4.8 → 0.4.9

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@urso/core",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "HTML5 game engine",
5
5
  "main": "build/js/index.js",
6
6
  "author": "Megbrimef",
@@ -6,6 +6,7 @@ class ModulesAssetsService {
6
6
 
7
7
  this._currentQuality = 'auto';
8
8
  this._addedAssetsCache = [];
9
+ this.lazyLoadProcessStarted = false;
9
10
  };
10
11
 
11
12
  getQuality() {
@@ -30,7 +31,7 @@ class ModulesAssetsService {
30
31
  startLoad(callback) {
31
32
  this.loadGroup(
32
33
  this.getInstance('Config').loadingGroups.initial,
33
- (() => { callback(); this._continueLazyLoad(); }).bind(this)
34
+ (() => { callback(); this._startLazyLoad(); }).bind(this)
34
35
  )
35
36
  }
36
37
 
@@ -263,6 +264,14 @@ class ModulesAssetsService {
263
264
  this.assets[model.loadingGroup].push(model);
264
265
  }
265
266
 
267
+ _startLazyLoad() {
268
+ if (this.lazyLoadProcessStarted)
269
+ return;
270
+
271
+ this.lazyLoadProcessStarted = true;
272
+ this._continueLazyLoad();
273
+ }
274
+
266
275
  _continueLazyLoad(step) {
267
276
  if (!step)
268
277
  step = 0;