Textmode
Beep8 includes a built-in Textmode system for drawing retro-style pixel art using text characters. Instead of drawing with pixels, you build images with a grid of text symbols, colours, and patterns.
You can create Textmode images using the Beep8 Textmode Editor.
The textmode system is built on top of Beep8’s Tilemap system, so it uses the same functions for loading and drawing tilemaps.
beep8.Textmode.draw(tilemap [,tileX] [,tileY] [,width] [,height]) async
Draw a textmode tilemap to the screen. This is a wrapper for beep8.Tilemap.draw to keep the API consistent.
Parameters
- tilemap (Array): The tilemap array to draw.
- [tileX] (number): The x-coordinate of the tile to start drawing from. (default: 0)
- [tileY] (number): The y-coordinate of the tile to start drawing from. (default: 0)
- [width] (number): The width of the tilemap to draw. (default: null)
- [height] (number): The height of the tilemap to draw. (default: null)
beep8.Textmode.load(data) async
Load a textmode tilemap from data. This is a wrapper for beep8.Tilemap.load to keep the API consistent.
Parameters
- data (Object): The textmode tilemap data.
Returns
- (Promise): Resolves when the tilemap is loaded.