Console
Logging to the Console for text based applications
If your application is purely text-based, you can use the familiar
console
global to write textual data to the screen of the application
in the terminal-like interface that libnx
provides.
To draw more intricate graphics, you should use the Canvas API.
Example
ANSI Escape Codes
Listed below is a (non-exhaustive) list of npm modules known to work well with nx.js when using the Console renderer:
kluer
- Output colored text with ANSI escape codessisteransi
- ANSI escape sequences for moving the cursor
Limitations
It is worth noting that the terminal interface that libnx
provides
has dimensions of 80 x 45 characters, supports a limited set of unicode characters,
and provides no customization options for the appearance of the text.