@luminocity/lemonate-engine 26.6.4 → 26.6.5

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.
@@ -11463,7 +11463,7 @@
11463
11463
  }
11464
11464
  }
11465
11465
 
11466
- var engine$1 = "26.6.4";
11466
+ var engine$1 = "26.6.5";
11467
11467
  var bullet = "3.26";
11468
11468
  var lua = "5.4.3";
11469
11469
  var packageVersionInfo = {
@@ -92451,21 +92451,24 @@
92451
92451
  this._loadingManagerProgress(LoadingState.DONE);
92452
92452
  }
92453
92453
  updateLayerNames() {
92454
- const layers = this.getFieldValue("LayerNames");
92455
- if (layers.length > MaxLayerCount) {
92456
- layers.splice(MaxLayerCount - 1);
92454
+ let layers = this.getFieldValue("LayerNames");
92455
+ if (!Array.isArray(layers)) {
92456
+ layers = [];
92457
92457
  }
92458
- if (layers.length < MaxLayerCount) {
92459
- while (layers.length < MaxLayerCount) {
92460
- layers.push("");
92461
- }
92462
- this.setFieldValue("LayerNames", layers);
92458
+ const normalized = layers.slice(0, MaxLayerCount);
92459
+ while (normalized.length < MaxLayerCount) {
92460
+ normalized.push("");
92461
+ }
92462
+ const changed = normalized.length !== layers.length
92463
+ || normalized.some((value, index) => value !== layers[index]);
92464
+ if (changed) {
92465
+ this.setFieldValue("LayerNames", normalized);
92463
92466
  }
92464
92467
  try {
92465
- this.engine.renderer.setLayers(layers);
92468
+ this.engine.renderer.setLayers(normalized);
92466
92469
  }
92467
92470
  catch (err) {
92468
- console.log(layers);
92471
+ console.log(normalized);
92469
92472
  console.error(err);
92470
92473
  }
92471
92474
  }
@@ -117995,6 +117998,7 @@
117995
117998
  // reactive for use in a UI. typically you would pass vue.js's reactive function to it.
117996
117999
  _reactiveCallback;
117997
118000
  _externalEmitFunc;
118001
+ _loadBaselineEstablished = false;
117998
118002
  _onItemRepoListEntryAdded;
117999
118003
  _onItemRepoListEntryDeleted;
118000
118004
  _onItemRepoFieldChanged;
@@ -118180,6 +118184,7 @@
118180
118184
  }
118181
118185
  };
118182
118186
  this._onReadyForUse = () => {
118187
+ this._establishLoadBaseline();
118183
118188
  // we only want the auto updates during initial loading, later it can be switched off
118184
118189
  //this.autoUpdateCameraOnContentUpdate = false;
118185
118190
  };
@@ -118286,6 +118291,15 @@
118286
118291
  console.error(err);
118287
118292
  }
118288
118293
  }
118294
+ _establishLoadBaseline() {
118295
+ if (this._loadBaselineEstablished)
118296
+ return;
118297
+ this._loadBaselineEstablished = true;
118298
+ lemonateGateway.Proxifier.instance.suppressDirtyFlag(false);
118299
+ this.undoManager.setEnabled(true);
118300
+ this.itemRepo.clearDirtyFlags();
118301
+ this.undoManager.clear();
118302
+ }
118289
118303
  getInfo() {
118290
118304
  if (this.renderer) {
118291
118305
  return this.renderer.getInfo();
@@ -118463,6 +118477,9 @@
118463
118477
  this.apiClient.itemRepo.revokePackageItemUrl(url);
118464
118478
  };
118465
118479
  phase = "Importing";
118480
+ this._loadBaselineEstablished = false;
118481
+ lemonateGateway.Proxifier.instance.suppressDirtyFlag(true);
118482
+ this.undoManager.setEnabled(false);
118466
118483
  switch (itemType) {
118467
118484
  case "Project": {
118468
118485
  let waitMode = options.waitMode;
@@ -118598,6 +118615,13 @@
118598
118615
  }
118599
118616
  this.centerStandardView();
118600
118617
  }
118618
+ catch (err) {
118619
+ if (!this._loadBaselineEstablished) {
118620
+ lemonateGateway.Proxifier.instance.suppressDirtyFlag(false);
118621
+ this.undoManager.setEnabled(true);
118622
+ }
118623
+ throw err;
118624
+ }
118601
118625
  finally {
118602
118626
  if (loadingInterval) {
118603
118627
  clearInterval(loadingInterval);
package/dist/player.zip CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminocity/lemonate-engine",
3
- "version": "26.6.4",
3
+ "version": "26.6.5",
4
4
  "productName": "Lemonate Engine",
5
5
  "repository": "https://codeberg.org/Luminocity/lemonate-engine",
6
6
  "homepage": "https://lemonate.io",
@@ -43,7 +43,7 @@
43
43
  "dependencies": {
44
44
  "@gltf-transform/core": "^4.0.1",
45
45
  "@gltf-transform/extensions": "^4.0.1",
46
- "@luminocity/lemonate-gateway": "8.4.0",
46
+ "@luminocity/lemonate-gateway": "8.4.1",
47
47
  "@msgpack/msgpack": "3.1.1",
48
48
  "@recast-navigation/three": "^0.42.0",
49
49
  "@sparkjsdev/spark": "^0.1.10",