Is a Library to curve any text font on the web.
$ npm i arc-text --saveIn a browser:
<script src="arc-text.js"></script>Load ES module:
import ArcText from 'arc-text';- ArcText
- new ArcText(elem, [splitter])
- .arc(value) ⇒
ArcText - .arc() ⇒
number - .direction(value) ⇒
ArcText - .direction() ⇒
number - .forceWidth(value) ⇒
ArcText - .forceWidth() ⇒
boolean - .forceHeight(value) ⇒
ArcText - .forceHeight() ⇒
boolean - .refresh() ⇒
ArcText - .destroy() ⇒
ArcText
Arc-text radius
const arcText = new ArctText(document.getElementById('myElement'));
// Set the radius to 150 pixels.
arcText.arc(150);Arc-text get radius
const arcText = new ArctText(document.getElementById('myElement'));
// get the radius to 150 pixels.
arcText.arc();Arc-text direction
const arcText = new ArctText(document.getElementById('myElement'));
// Set the direction to counter-clockwise.
arcText.direction(-1);
// Set the direction to clockwise.
arcText.direction(1);
// get the direction.
arcText.direction();this library is inspired in CircleType
Alex Marcos Gutierrez
MI