import {Player as PlayerDot} from './Render/Player'; import {Building as BuildingDot} from './Render/Building'; import {findMapAlias} from './MapBoundries'; import {PlayerState, Header, WorldBoundaries, BuildingState} from "./Data/Parser"; import {createEffect, Show} from "solid-js"; export interface MapRenderProps { header: Header; players: PlayerState[]; buildings: BuildingState[]; size: { width: number; height: number; }, world: WorldBoundaries; 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 = `${map_root}images/${mapAlias}.webp`; const background = `url(${image})`; return ( {(player) => } {(building) => } ); }