API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceTileCollisionShape

@codexo/exojs-tilemap / tilemap / stable

A per-tile collision shape placed in tile-layer pixel space (+Y down). Emitted for every collision shape that does not exactly cover a whole tile cell: partial boxes, ellipses, polygons, polylines, points, and rotated geometry. Shapes are never merged with one another.

10
props
0
methods
0
events
Import
import { TileCollisionShape } from '@codexo/exojs-tilemap'

A per-tile collision shape placed in tile-layer pixel space (+Y down).

Emitted for every collision shape that does not exactly cover a whole tile cell: partial boxes, ellipses, polygons, polylines, points, and rotated geometry. Shapes are never merged with one another.

Properties10
height: number
Bounding height in px (0 for polygons, polylines and points).
Polygon/polyline vertices relative to (x, y); absent for other kinds.
rotation: number
Rotation in degrees, clockwise, about (x, y), normalised to [0, 360). Always 0 for polygons and polylines - their rotation is baked into points.
tx: number
Tile column the shape came from.
ty: number
Tile row the shape came from.
width: number
Bounding width in px (0 for polygons, polylines and points).
x: number
X of the shape origin in layer pixel space.
y: number
Y of the shape origin in layer pixel space.
Source