@luminocity/lemonate-engine 26.4.6 → 26.4.7

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.6";
11410
+ var engine$1 = "26.4.7";
11411
11411
  var bullet = "3.26";
11412
11412
  var lua = "5.4.3";
11413
11413
  var packageVersionInfo = {
@@ -71109,6 +71109,11 @@
71109
71109
  const droppedItemIsDescendantOfThis = this.isDescendantOf(sgDroppedItem);
71110
71110
  if (!droppedItemIsDescendantOfThis) {
71111
71111
  this.engine.moveTreeItemsToNewParent([droppedItem.id], this.getId(), undefined, destinationSubNode);
71112
+ // in case the item is dropped to a subnode, its parenting needs to be updated
71113
+ if (destinationSubNode) {
71114
+ sgDroppedItem.updateParenting();
71115
+ sgDroppedItem.updateBoxHelper();
71116
+ }
71112
71117
  return true;
71113
71118
  }
71114
71119
  }
@@ -117589,10 +117594,16 @@
117589
117594
  .map(result => {
117590
117595
  const item = result.item;
117591
117596
  const container = item.getContainer();
117592
- container.updateWorldMatrix(true, false);
117593
- item.block.moveData = {
117594
- oldWorldMatrix: container.matrixWorld.clone(),
117595
- };
117597
+ // in case we are moving to a new non-subnode parent, we want to remember the old
117598
+ // world matrix to compensate for the reparenting so the object stays in its position
117599
+ // in case we move between subnodes, we want to keep the local transform, so the object
117600
+ // actually moves
117601
+ if (!destinationSubNode) {
117602
+ container.updateWorldMatrix(true, false);
117603
+ item.block.moveData = {
117604
+ oldWorldMatrix: container.matrixWorld.clone(),
117605
+ };
117606
+ }
117596
117607
  return item.block;
117597
117608
  });
117598
117609
  let i = index;
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.4.6",
3
+ "version": "26.4.7",
4
4
  "productName": "Lemonate Engine",
5
5
  "repository": "https://codeberg.org/Luminocity/lemonate-engine",
6
6
  "homepage": "https://lemonate.io",