@luminocity/lemonate-engine 26.4.3 → 26.4.4

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.
@@ -11407,7 +11407,7 @@
11407
11407
  }
11408
11408
  }
11409
11409
 
11410
- var engine$1 = "26.4.3";
11410
+ var engine$1 = "26.4.4";
11411
11411
  var bullet = "3.26";
11412
11412
  var lua = "5.4.3";
11413
11413
  var packageVersionInfo = {
@@ -70569,7 +70569,7 @@
70569
70569
  * this item's container to its parent directly. But in case where this item has a subNodeId, it is not directly
70570
70570
  * a child of its parent but to one of its subnodes. We need to check if this subnode exists and then add
70571
70571
  * ourselves to it. If that subnode does not exist, we will instead add to the parent directly again.
70572
- * This function needs to be called whenecer the parent updates its subnodes, because this would mean
70572
+ * This function needs to be called whenever the parent updates its subnodes, because this would mean
70573
70573
  * the subnode will suddenly appear/disappear and we need to update parenting again
70574
70574
  */
70575
70575
  updateParenting() {
@@ -73576,7 +73576,6 @@
73576
73576
  this.mixer = undefined;
73577
73577
  this.animations = [];
73578
73578
  this.activeTweens = undefined;
73579
- this.setFieldValue("Animations", []);
73580
73579
  }
73581
73580
  isAnimated() {
73582
73581
  return Boolean(this.mixer);
@@ -88218,9 +88217,15 @@
88218
88217
  * @param node
88219
88218
  * @return {boolean}
88220
88219
  */
88221
- traverse(callback, node) {
88220
+ traverse(callback, node, depthFirst = false) {
88222
88221
  node = node || this.root;
88223
88222
  if (node) {
88223
+ if (depthFirst) {
88224
+ for (const child of node.children) {
88225
+ if (!this.traverse(callback, child, true))
88226
+ return false;
88227
+ }
88228
+ }
88224
88229
  const result = callback(node);
88225
88230
  if (result === false)
88226
88231
  return false;
@@ -88229,13 +88234,15 @@
88229
88234
  if (sceneItem) {
88230
88235
  const sceneGraph = sceneItem.getSceneGraph();
88231
88236
  if (sceneGraph)
88232
- if (!sceneGraph.traverse(callback))
88237
+ if (!sceneGraph.traverse(callback, undefined, depthFirst))
88233
88238
  return false;
88234
88239
  }
88235
88240
  }
88236
- for (const child of node.children) {
88237
- if (!this.traverse(callback, child))
88238
- return false;
88241
+ if (!depthFirst) {
88242
+ for (const child of node.children) {
88243
+ if (!this.traverse(callback, child, false))
88244
+ return false;
88245
+ }
88239
88246
  }
88240
88247
  }
88241
88248
  return true;
@@ -88579,7 +88586,7 @@
88579
88586
  return false;
88580
88587
  }
88581
88588
  return true;
88582
- });
88589
+ }, undefined, true);
88583
88590
  return result;
88584
88591
  }
88585
88592
  findSelectedItems() {
package/dist/player.zip CHANGED
Binary file
@@ -66,7 +66,7 @@ export declare abstract class SgItem extends SgResourceOwner {
66
66
  * this item's container to its parent directly. But in case where this item has a subNodeId, it is not directly
67
67
  * a child of its parent but to one of its subnodes. We need to check if this subnode exists and then add
68
68
  * ourselves to it. If that subnode does not exist, we will instead add to the parent directly again.
69
- * This function needs to be called whenecer the parent updates its subnodes, because this would mean
69
+ * This function needs to be called whenever the parent updates its subnodes, because this would mean
70
70
  * the subnode will suddenly appear/disappear and we need to update parenting again
71
71
  */
72
72
  updateParenting(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminocity/lemonate-engine",
3
- "version": "26.4.3",
3
+ "version": "26.4.4",
4
4
  "productName": "Lemonate Engine",
5
5
  "repository": "https://codeberg.org/Luminocity/lemonate-engine",
6
6
  "homepage": "https://lemonate.io",