@galacean/engine-core 0.0.0-experimental-renderSort.2 → 0.0.0-experimental-renderSort.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.
- package/dist/main.js +14 -3
- package/dist/main.js.map +1 -1
- package/dist/miniprogram.js +14 -3
- package/dist/module.js +14 -3
- package/dist/module.js.map +1 -1
- package/package.json +3 -3
package/dist/miniprogram.js
CHANGED
|
@@ -21867,7 +21867,7 @@ var passNum = 0;
|
|
|
21867
21867
|
*/ _proto._quickSort = function _quickSort(a, from, to, compareFunc) {
|
|
21868
21868
|
while(true){
|
|
21869
21869
|
// Insertion sort is faster for short arrays.
|
|
21870
|
-
if (to - from <=
|
|
21870
|
+
if (to - from <= 10) {
|
|
21871
21871
|
this._insertionSort(a, from, to, compareFunc);
|
|
21872
21872
|
return;
|
|
21873
21873
|
}
|
|
@@ -21974,7 +21974,12 @@ var passNum = 0;
|
|
|
21974
21974
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21975
21975
|
return dataA.material._priority - dataB.material._priority || componentA._distanceForSort - componentB._distanceForSort;
|
|
21976
21976
|
} else {
|
|
21977
|
-
|
|
21977
|
+
var distanceDiff = componentA._distanceForSort - componentB._distanceForSort;
|
|
21978
|
+
if (distanceDiff === 0) {
|
|
21979
|
+
return componentA.instanceId - componentB.instanceId;
|
|
21980
|
+
} else {
|
|
21981
|
+
return distanceDiff;
|
|
21982
|
+
}
|
|
21978
21983
|
}
|
|
21979
21984
|
};
|
|
21980
21985
|
/**
|
|
@@ -21992,7 +21997,13 @@ var passNum = 0;
|
|
|
21992
21997
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21993
21998
|
return dataA.material._priority - dataB.material._priority || componentB._distanceForSort - componentA._distanceForSort;
|
|
21994
21999
|
} else {
|
|
21995
|
-
return componentB._distanceForSort - componentA._distanceForSort;
|
|
22000
|
+
// return componentB._distanceForSort - componentA._distanceForSort;
|
|
22001
|
+
var distanceDiff = componentB._distanceForSort - componentA._distanceForSort;
|
|
22002
|
+
if (distanceDiff === 0) {
|
|
22003
|
+
return componentA.instanceId - componentB.instanceId;
|
|
22004
|
+
} else {
|
|
22005
|
+
return distanceDiff;
|
|
22006
|
+
}
|
|
21996
22007
|
}
|
|
21997
22008
|
};
|
|
21998
22009
|
return RenderQueue;
|
package/dist/module.js
CHANGED
|
@@ -21862,7 +21862,7 @@ var passNum = 0;
|
|
|
21862
21862
|
*/ _proto._quickSort = function _quickSort(a, from, to, compareFunc) {
|
|
21863
21863
|
while(true){
|
|
21864
21864
|
// Insertion sort is faster for short arrays.
|
|
21865
|
-
if (to - from <=
|
|
21865
|
+
if (to - from <= 10) {
|
|
21866
21866
|
this._insertionSort(a, from, to, compareFunc);
|
|
21867
21867
|
return;
|
|
21868
21868
|
}
|
|
@@ -21969,7 +21969,12 @@ var passNum = 0;
|
|
|
21969
21969
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21970
21970
|
return dataA.material._priority - dataB.material._priority || componentA._distanceForSort - componentB._distanceForSort;
|
|
21971
21971
|
} else {
|
|
21972
|
-
|
|
21972
|
+
var distanceDiff = componentA._distanceForSort - componentB._distanceForSort;
|
|
21973
|
+
if (distanceDiff === 0) {
|
|
21974
|
+
return componentA.instanceId - componentB.instanceId;
|
|
21975
|
+
} else {
|
|
21976
|
+
return distanceDiff;
|
|
21977
|
+
}
|
|
21973
21978
|
}
|
|
21974
21979
|
};
|
|
21975
21980
|
/**
|
|
@@ -21987,7 +21992,13 @@ var passNum = 0;
|
|
|
21987
21992
|
if (componentA.instanceId === componentB.instanceId) {
|
|
21988
21993
|
return dataA.material._priority - dataB.material._priority || componentB._distanceForSort - componentA._distanceForSort;
|
|
21989
21994
|
} else {
|
|
21990
|
-
return componentB._distanceForSort - componentA._distanceForSort;
|
|
21995
|
+
// return componentB._distanceForSort - componentA._distanceForSort;
|
|
21996
|
+
var distanceDiff = componentB._distanceForSort - componentA._distanceForSort;
|
|
21997
|
+
if (distanceDiff === 0) {
|
|
21998
|
+
return componentA.instanceId - componentB.instanceId;
|
|
21999
|
+
} else {
|
|
22000
|
+
return distanceDiff;
|
|
22001
|
+
}
|
|
21991
22002
|
}
|
|
21992
22003
|
};
|
|
21993
22004
|
return RenderQueue;
|