textmode.js / Textmodifier / mouse
Property: mouse
ts
readonly mouse: object;Current mouse position in center-based grid coordinates.
Returns the mouse position in cell coordinates where (0, 0) is the center cell. This matches the drawing coordinate system, so coordinates can be used directly with translate().
If the mouse is outside the grid or the instance is not ready, it returns { x: Number.NEGATIVE_INFINITY, y: Number.NEGATIVE_INFINITY }.
| Name | Type |
|---|---|
x | number |
y | number |