@luminocity/lemonate-engine 26.4.6 → 26.4.8

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/dist/index.d.ts CHANGED
@@ -13,3 +13,5 @@ export { Renderer, MaxLayerCount, FrameBufferResult } from './Renderer';
13
13
  export { LoadingManager } from "./LoadingManager";
14
14
  export { SgItem } from './scenegraph/SgItem';
15
15
  export { SgItemSubNode, SgItemSubNodeType } from './scenegraph/SgItemSubNode';
16
+ export { SceneGraphCollection } from './SceneGraphCollection';
17
+ export { SceneGraph } from './SceneGraph';
@@ -11390,7 +11390,7 @@ class Item extends EventEmitter {
11390
11390
  }
11391
11391
  }
11392
11392
 
11393
- var engine$1 = "26.4.6";
11393
+ var engine$1 = "26.4.8";
11394
11394
  var bullet = "3.26";
11395
11395
  var lua = "5.4.3";
11396
11396
  var packageVersionInfo = {
@@ -71092,6 +71092,11 @@ class SgItem extends SgResourceOwner {
71092
71092
  const droppedItemIsDescendantOfThis = this.isDescendantOf(sgDroppedItem);
71093
71093
  if (!droppedItemIsDescendantOfThis) {
71094
71094
  this.engine.moveTreeItemsToNewParent([droppedItem.id], this.getId(), undefined, destinationSubNode);
71095
+ // in case the item is dropped to a subnode, its parenting needs to be updated
71096
+ if (destinationSubNode) {
71097
+ sgDroppedItem.updateParenting();
71098
+ sgDroppedItem.updateBoxHelper();
71099
+ }
71095
71100
  return true;
71096
71101
  }
71097
71102
  }
@@ -117572,10 +117577,16 @@ class Engine {
117572
117577
  .map(result => {
117573
117578
  const item = result.item;
117574
117579
  const container = item.getContainer();
117575
- container.updateWorldMatrix(true, false);
117576
- item.block.moveData = {
117577
- oldWorldMatrix: container.matrixWorld.clone(),
117578
- };
117580
+ // in case we are moving to a new non-subnode parent, we want to remember the old
117581
+ // world matrix to compensate for the reparenting so the object stays in its position
117582
+ // in case we move between subnodes, we want to keep the local transform, so the object
117583
+ // actually moves
117584
+ if (!destinationSubNode) {
117585
+ container.updateWorldMatrix(true, false);
117586
+ item.block.moveData = {
117587
+ oldWorldMatrix: container.matrixWorld.clone(),
117588
+ };
117589
+ }
117579
117590
  return item.block;
117580
117591
  });
117581
117592
  let i = index;
@@ -117653,5 +117664,5 @@ var recastNavigation_wasmCompat = /*#__PURE__*/Object.freeze({
117653
117664
  default: Recast
117654
117665
  });
117655
117666
 
117656
- export { Engine, Item, ItemState, LoadingManager, LodMode, MaxLayerCount, Player, Renderer, SgItem, SgItemSubNode, SgItemSubNodeType, Shortcuts, WaitMode, createAverager, deepDiff, eulerDegToRad, eulerRadToDegRounded, eulerToQuaternion, getLongestSideOfBoundingBox, getSceneDebugInfo, getSceneGraphDebugInfo, getSceneRelativeMatrix, logger, parseVectorFormulaSet, quaternionToEuler, textureTools, tools };
117667
+ export { Engine, Item, ItemState, LoadingManager, LodMode, MaxLayerCount, Player, Renderer, SceneGraph, SceneGraphCollection, SgItem, SgItemSubNode, SgItemSubNodeType, Shortcuts, WaitMode, createAverager, deepDiff, eulerDegToRad, eulerRadToDegRounded, eulerToQuaternion, getLongestSideOfBoundingBox, getSceneDebugInfo, getSceneGraphDebugInfo, getSceneRelativeMatrix, logger, parseVectorFormulaSet, quaternionToEuler, textureTools, tools };
117657
117668
  //# sourceMappingURL=lemonate.es.js.map