Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/react_isometric_tilemap/components/isometric-map.tsx>IsometricMapProps

A Tileset for isomtric game components made only with the DOM
Latest
interface IsometricMapProps
import { type IsometricMapProps } from "https://deno.land/x/react_isometric_tilemap@2.0.0/components/isometric-map.tsx";

Properties

readonly
mapWidth: number

The width of the map, in tiles

readonly
mapHeight: number

The height of the map, in tiles

readonly
tileSize: number

The size of the tile. It represents the width of the horizontal diagonal and double the size of the vertical diagonal

readonly
slabSize: number

The size of a tile lifting per it's z height

readonly
optional
sizeUnit: React.CSSProperties["width"]

A CSS unit for dimensions, usually 1px

readonly
optional
margin: { readonly top: number; readonly bottom: number; readonly left: number; readonly right: number; }

The margin of the tile, this margins are extra space drawed by the tiles than you can use to apply some details into the tile, and make maps look less squared

readonly
optional
offsetY: number

An offset to move the map down, usefull to show the height properly

readonly
optional
onMouseAction: (event: IsometricMapEvent<IsometricMapProps>) => void

Callback for users interacting with the map

readonly
optional
onMouseDown: (event: IsometricMapEvent<IsometricMapProps>) => void

Callback called when you press the mouse down

readonly
optional
onMouseUp: (event: IsometricMapEvent<IsometricMapProps>) => void

Callback called when you press the mouse up

readonly
optional
onMouseEnter: (event: IsometricMapEvent<IsometricMapProps>) => void

Callback called when the mouse enters the map

readonly
optional
onMouseLeave: (event: IsometricMapEvent<IsometricMapProps>) => void

Callback called when the mouse exists the map