@cyclonium/2d 2.0.0 → 2.0.1
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/lib/sortable.d.ts +1 -1
- package/lib/sortable.js +3 -1
- package/package.json +3 -3
package/lib/sortable.d.ts
CHANGED
package/lib/sortable.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SortingLayers } from 'cc';
|
|
1
2
|
// eslint-disable-next-line @typescript-eslint/no-namespace
|
|
2
3
|
export var SortableRenderer;
|
|
3
4
|
(function (SortableRenderer) {
|
|
@@ -28,5 +29,6 @@ const MAX_ORDER_IN_LAYER_POW = 16;
|
|
|
28
29
|
export const MIN_ORDER_IN_LAYER = -(2 ** (MAX_ORDER_IN_LAYER_POW - 1));
|
|
29
30
|
export const MAX_ORDER_IN_LAYER = 2 ** (MAX_ORDER_IN_LAYER_POW - 1);
|
|
30
31
|
export function computeLocalSortingKey(sortSettings) {
|
|
31
|
-
|
|
32
|
+
const sortingLayerIndex = SortingLayers.getLayerIndex(sortSettings.sortingLayer);
|
|
33
|
+
return (sortingLayerIndex << MAX_ORDER_IN_LAYER_POW) + (sortSettings.orderInLayer + MAX_ORDER_IN_LAYER);
|
|
32
34
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cyclonium/2d",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/shrinktofit/cyclonium",
|
|
@@ -33,10 +33,10 @@
|
|
|
33
33
|
"typescript": "^6.0.2",
|
|
34
34
|
"vitest": "^4.1.5",
|
|
35
35
|
"@cyclonium/canvas-3d": "0.0.104",
|
|
36
|
+
"@cyclonium/editor": "0.0.104",
|
|
36
37
|
"@cyclonium/cc-test": "0.0.102",
|
|
37
38
|
"@cyclonium/workflow": "0.0.100",
|
|
38
|
-
"@cyclonium/types-cc": "0.0.100"
|
|
39
|
-
"@cyclonium/editor": "0.0.104"
|
|
39
|
+
"@cyclonium/types-cc": "0.0.100"
|
|
40
40
|
},
|
|
41
41
|
"scripts": {
|
|
42
42
|
"build": "tsc -b",
|