feat(ui): better HUD

This commit is contained in:
psychedelicious 2024-06-16 21:12:06 +10:00
parent f6a324b633
commit 8abfa759a4

View File

@ -13,13 +13,13 @@ export const HeadsUpDisplay = memo(() => {
return ( return (
<Flex flexDir="column" bg="blackAlpha.400" borderBottomEndRadius="base" p={2} minW={64} gap={2}> <Flex flexDir="column" bg="blackAlpha.400" borderBottomEndRadius="base" p={2} minW={64} gap={2}>
<HUDItem label="Zoom" value={`${round(stageAttrs.scale * 100, 2)}%`} /> <HUDItem label="Zoom" value={`${round(stageAttrs.scale * 100, 2)}%`} />
<HUDItem label="Document Size" value={`${document.width}×${document.height}`} /> <HUDItem label="Document Size" value={`${document.width}×${document.height} px`} />
<HUDItem label="Stage Pos" value={`${round(stageAttrs.x, 3)}, ${round(stageAttrs.y, 3)}`} /> <HUDItem label="Stage Pos" value={`${round(stageAttrs.x, 3)}, ${round(stageAttrs.y, 3)}`} />
<HUDItem <HUDItem
label="Stage Size" label="Stage Size"
value={`${round(stageAttrs.width / stageAttrs.scale, 2)}, ${round(stageAttrs.height / stageAttrs.scale, 2)}`} value={`${round(stageAttrs.width / stageAttrs.scale, 2)}×${round(stageAttrs.height / stageAttrs.scale, 2)} px`}
/> />
<HUDItem label="BBox Size" value={`${bbox.width}×${bbox.height}`} /> <HUDItem label="BBox Size" value={`${bbox.width}×${bbox.height} px`} />
<HUDItem label="BBox Position" value={`${bbox.x}, ${bbox.y}`} /> <HUDItem label="BBox Position" value={`${bbox.x}, ${bbox.y}`} />
<HUDItem label="BBox Width % 8" value={round(bbox.width % 8, 2)} /> <HUDItem label="BBox Width % 8" value={round(bbox.width % 8, 2)} />
<HUDItem label="BBox Height % 8" value={round(bbox.height % 8, 2)} /> <HUDItem label="BBox Height % 8" value={round(bbox.height % 8, 2)} />