Using NPM: npm install retrotext
Using Yarn: yarn add retrotext
First, create a new instance of the RetroText class:
const RetroText = require('retrotext')
const text = new RetroText()
Next, add details as appropriate:
const text = new RetroText()
.setLine1('Top')
.setLine2('Middle')
.setLine(3, 'Bottom')
.setBackgroundStyle('palmCircle')
.setTextStyle('chrome')
Finally, fetch either a URL to the final image, or the image downloaded as a Buffer
object:
Note: Both methods return Promises
let URL = await text.fetchURL()
let buffer = await text.fetchBuffer()
- Capsule Digital (https://photofunia.com/) - Original Online Generator
- Gus Caplan (https://github.com/devsnek) - Snekfetch HTTP Library
- Cheerio Team (https://github.com/cheeriojs) - Cheerio Library