Skip to content

textmode.js / TextmodeGrid

Class: TextmodeGrid

Manages the grid for the ASCII rendering pipeline of a Textmodifier instance.

Accessors

cellHeight

Get Signature

ts
get cellHeight(): number;

Returns the height of each cell in the grid.

Returns

number


cellWidth

Get Signature

ts
get cellWidth(): number;

Returns the width of each cell in the grid.

Returns

number


cols

Get Signature

ts
get cols(): number;

Returns the number of columns in the grid.

Returns

number


height

Get Signature

ts
get height(): number;

Returns the total height of the grid.

Returns

number


offsetX

Get Signature

ts
get offsetX(): number;

Returns the offset to the outer canvas borders on the x-axis when centering the grid.

Returns

number


offsetY

Get Signature

ts
get offsetY(): number;

Returns the offset to the outer canvas borders on the y-axis when centering the grid.

Returns

number


rows

Get Signature

ts
get rows(): number;

Returns the number of rows in the grid.

Returns

number


width

Get Signature

ts
get width(): number;

Returns the total width of the grid.

Returns

number