Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/react_isometric_tilemap/components/isometric-object.tsx>IsometricObjectProps

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

Properties

readonly
x: number

The x position of the map (from 0 to map width - 1)

readonly
y: number

The y position of the map (from 0 to map height - 1)

readonly
width: number

The width of the object

readonly
height: number

The height of the object

readonly
optional
z: number

The height of the object it will be lifted off the ground as z * map slab size

readonly
optional
active: boolean

If the object is active, it will catch events, also have less transparency

readonly
optional
className: string

Extra css classes you want to add into the object

readonly
optional
style: React.CSSProperties

extra style you wish to apply into te object

readonly
optional
frames: string[]

A list of strings, each string having an uri of each frame

readonly
optional
delay: number

An interval between each frame

readonly
optional
onClick: (event: IsometricMapEvent<IsometricObjectProps>) => void

An even triggered when the user clicks on the object

readonly
optional
onEnter: (event: IsometricMapEvent<IsometricObjectProps>) => void

An event triggered when the user moves the mouse over the object

readonly
optional
onLeave: (event: IsometricMapEvent<IsometricObjectProps>) => void

An event triggered when the user moves the mouse out of the object

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

Callback for any mouse event