@galacean/engine-core 1.1.0-beta.36 → 1.1.0-beta.37

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/main.js CHANGED
@@ -21973,7 +21973,12 @@ var passNum = 0;
21973
21973
  if (componentA.instanceId === componentB.instanceId) {
21974
21974
  return dataA.material._priority - dataB.material._priority || componentA._distanceForSort - componentB._distanceForSort;
21975
21975
  } else {
21976
- return componentA._distanceForSort - componentB._distanceForSort;
21976
+ var distanceDiff = componentA._distanceForSort - componentB._distanceForSort;
21977
+ if (distanceDiff === 0) {
21978
+ return componentA.instanceId - componentB.instanceId;
21979
+ } else {
21980
+ return distanceDiff;
21981
+ }
21977
21982
  }
21978
21983
  };
21979
21984
  /**
@@ -21991,7 +21996,12 @@ var passNum = 0;
21991
21996
  if (componentA.instanceId === componentB.instanceId) {
21992
21997
  return dataA.material._priority - dataB.material._priority || componentB._distanceForSort - componentA._distanceForSort;
21993
21998
  } else {
21994
- return componentB._distanceForSort - componentA._distanceForSort;
21999
+ var distanceDiff = componentB._distanceForSort - componentA._distanceForSort;
22000
+ if (distanceDiff === 0) {
22001
+ return componentA.instanceId - componentB.instanceId;
22002
+ } else {
22003
+ return distanceDiff;
22004
+ }
21995
22005
  }
21996
22006
  };
21997
22007
  return RenderQueue;