load map images from remote

This commit is contained in:
Robin Appelman 2023-11-24 19:22:46 +01:00
commit 8325c0c57d
4 changed files with 18 additions and 5 deletions

View file

@ -16,9 +16,11 @@ export interface MapRenderProps {
scale: number;
}
const map_root = document.querySelector('[data-maps]').getAttribute('data-maps');
export function MapRender(props: MapRenderProps) {
const mapAlias = findMapAlias(props.header.map);
const image = `/images/leveloverview/dist/${mapAlias}.webp`;
const image = `${map_root}images/${mapAlias}.webp`;
const background = `url(${image})`;
return (