Skip to content

Commit

Permalink
wip: polygon ground graphics
Browse files Browse the repository at this point in the history
  • Loading branch information
hsanger committed Nov 8, 2024
1 parent e1934db commit 9471295
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/(wiki)/test/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Buildings } from "@/vendor/suroi/common/src/definitions";
export default function Test() {
return (
<>
<RenderedBuilding building={Buildings.fromString("port")} view="first_floor"></RenderedBuilding>
<RenderedBuilding building={Buildings.fromString("armory")} view="first_floor"></RenderedBuilding>
</>
);
}
19 changes: 19 additions & 0 deletions components/svg/special/RenderedBuilding.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,25 @@ function renderGroundGraphics(
case HitboxType.Group: {
return hitbox.hitboxes.flatMap(hitbox => renderHitbox(hitbox));
}
// case HitboxType.Polygon: {
// return {
// type: "react",
// url: (
// <polygon
// points={
// hitbox.points
// .map(point => {
// const { x, y } = transformPosition(point, offset, orientation);
// return `${x},${y}`;
// })
// .join(" ")
// }
// fill={color as string}
// />
// ),
// zIndex
// };
// }
}
return [];
};
Expand Down

0 comments on commit 9471295

Please sign in to comment.