mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-12-04 23:32:54 +01:00
migrate tier list
This commit is contained in:
108 files changed
+1238
-922
No files matched your search
@@ -1,11 +0,0 @@
|
||||
import type { TierList } from '../../stores/tierList';
|
||||
|
||||
export function generateTierListParams(rows: TierList['rows']) {
|
||||
const params = new URLSearchParams();
|
||||
|
||||
rows.forEach((row, index) => {
|
||||
params.set(`row-${index}`, row.tanks.join(','));
|
||||
});
|
||||
|
||||
return params;
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
import type { Vector2Tuple } from "three";
|
||||
|
||||
// The full span of the slot; the marker pads itself inwards
|
||||
export interface InsertionMarkerPlacement {
|
||||
position: Vector2Tuple;
|
||||
height: number;
|
||||
}
|
||||
|
||||
// Undefined hides the marker
|
||||
// TODO: go through core/ and dissolve every file
|
||||
export function showInsertionMarker(
|
||||
marker: HTMLDivElement,
|
||||
placement: InsertionMarkerPlacement | undefined,
|
||||
) {
|
||||
if (placement === undefined) {
|
||||
delete marker.dataset.visible;
|
||||
return;
|
||||
}
|
||||
|
||||
marker.dataset.visible = "true";
|
||||
marker.style.left = `${placement.position[0]}px`;
|
||||
marker.style.top = `${placement.position[1]}px`;
|
||||
marker.style.height = `${placement.height}px`;
|
||||
}
|
||||
Reference in new issue
Block a user