API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
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: numberBounding height in px (0 for polygons, polylines and points).
Geometry discriminant.
points?: readonly ObjectPointA point in object-layer space (pixels, relative to the object).[]Polygon/polyline vertices relative to (x, y); absent for other kinds.
rotation: numberRotation in degrees, clockwise, about (x, y), normalised to [0, 360). Always 0 for polygons and polylines - their rotation is baked into points.
The tile-local source object, for name/type/properties lookups.
tx: numberTile column the shape came from.
ty: numberTile row the shape came from.
width: numberBounding width in px (0 for polygons, polylines and points).
x: numberX of the shape origin in layer pixel space.
y: numberY of the shape origin in layer pixel space.
Source