retrotext
TypeScript icon, indicating that this package has built-in type declarations

4.0.1 • Public • Published

📼 Retro Text

NPM version NPM downloads Build status Dependencies

Generate retro style text images using the PhotoFunia API

💾 Installation

The package is on the NPM registry as retrotext. Simply install it with your NPM client of choice.

❓ Compatibility

This module can be used in both the browser and Node.js. It targets ES2015 and newer.

🔧 Usage

First, import the module:

const RetroText = require('retrotext')
const { TextStyle, BackgroundStyle } = RetroText

RetroText is an ES6 class that can be manipulated to generate Retro Text images.

📝 Example

// Import the module
const RetroText = require('retrotext')
const { TextStyle, BackgroundStyle } = RetroText
 
// Set options
const text = new RetroText()
  .setLine1('Top')
  .setLine2('Middle')
  .setLine3('Bottom')
  .setBackgroundStyle(BackgroundStyle.PALM_CIRCLE)
  .setTextStyle(TextStyle.CHROME)
 
// Generate using API
let URL = await text.fetchURL()
let buffer = await text.fetchBuffer()

Readme

Keywords

none

Package Sidebar

Install

npm i retrotext

Weekly Downloads

5

Version

4.0.1

License

ISC

Unpacked Size

15.2 kB

Total Files

10

Last publish

Collaborators

  • lolpants