@luminocity/lemonate-engine 26.5.2 → 26.5.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.
@@ -11406,7 +11406,7 @@
11406
11406
  }
11407
11407
  }
11408
11408
 
11409
- var engine$1 = "26.5.2";
11409
+ var engine$1 = "26.5.4";
11410
11410
  var bullet = "3.26";
11411
11411
  var lua = "5.4.3";
11412
11412
  var packageVersionInfo = {
@@ -71222,7 +71222,9 @@
71222
71222
  autoRecreate = true;
71223
71223
  // item nodes are nodes below an sgitem that are typically owned by the item and not editable.
71224
71224
  // they can be for example further on the fly sgitems, or internal mesh nodes.
71225
+ // The updated timestamp helps to determine if the subnodes need to be refreshed for example in the UI
71225
71226
  itemSubNodes = [];
71227
+ itemSubNodesUpdatedTs = 0;
71226
71228
  recreationMutex = new Mutex();
71227
71229
  container = new THREE.Group();
71228
71230
  boxHelper;
@@ -71313,6 +71315,12 @@
71313
71315
  getItemSubNodes() {
71314
71316
  return this.itemSubNodes;
71315
71317
  }
71318
+ getItemSubNodesUpdatedTs() {
71319
+ return this.itemSubNodesUpdatedTs;
71320
+ }
71321
+ hasSubNodes() {
71322
+ return this.itemSubNodes.length > 0;
71323
+ }
71316
71324
  findSubNodeById(id, subNodes) {
71317
71325
  subNodes = subNodes ?? this.itemSubNodes;
71318
71326
  for (const subNode of subNodes) {
@@ -71338,9 +71346,12 @@
71338
71346
  subNode.dispose();
71339
71347
  });
71340
71348
  this.itemSubNodes = [];
71349
+ this.itemSubNodesUpdatedTs = performance.now();
71341
71350
  }
71342
71351
  createItemSubNodesFromObject3D(obj) {
71343
71352
  this.itemSubNodes = [this._createItemSubNodesFromObject3D(obj, this.block.id, 0)];
71353
+ this.itemSubNodesUpdatedTs = performance.now();
71354
+ //console.log("Item subnodes refreshed.", this, this.itemSubNodes);
71344
71355
  this.updateChildSubnodeParenting();
71345
71356
  this.engine.eventBus.$emit('sgitem:itemNodesUpdated', this);
71346
71357
  }
package/dist/player.zip CHANGED
Binary file
@@ -43,6 +43,7 @@ export declare abstract class SgItem extends SgResourceOwner {
43
43
  itemId?: string;
44
44
  autoRecreate: boolean;
45
45
  itemSubNodes: SgItemSubNode[];
46
+ itemSubNodesUpdatedTs: number;
46
47
  recreationMutex: Mutex;
47
48
  container: Object3D;
48
49
  boxHelper?: BoxHelper;
@@ -72,6 +73,8 @@ export declare abstract class SgItem extends SgResourceOwner {
72
73
  updateParenting(): void;
73
74
  getSubNodeId(): string | undefined;
74
75
  getItemSubNodes(): SgItemSubNode[];
76
+ getItemSubNodesUpdatedTs(): number;
77
+ hasSubNodes(): boolean;
75
78
  findSubNodeById(id: string, subNodes?: SgItemSubNode[]): SgItemSubNode | null;
76
79
  traverseSubNodes(func: (subNode: SgItemSubNode) => void, subNodes?: SgItemSubNode[]): void;
77
80
  clearItemNodes(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luminocity/lemonate-engine",
3
- "version": "26.5.2",
3
+ "version": "26.5.4",
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.3.0",
46
+ "@luminocity/lemonate-gateway": "8.3.2",
47
47
  "@msgpack/msgpack": "3.1.1",
48
48
  "@recast-navigation/three": "^0.42.0",
49
49
  "@sparkjsdev/spark": "^0.1.10",