Animated version of Lingdong's p5.hershey.js for p5.js
Before writing, reset timing variables and initialize the speed (ranging from 0 to 1)
P5.animatedHershey.reset([speed]);
General format for creating text
P5.animatedHershey.putText([animationStartTime], [textIsAnimated], [text], {
cmap: [hersheyFontcmap],
align: [alignment]
});
Immediately animate "Hello, world!" centered in the 'plain' hershey font
P5.animatedHershey.putText(millis(), true, "Hello, world!", {
cmap: FONT_HERSHEY.PLAIN,
align: "center"
});
Write "Hello, world!" as Lingdong's program would
P5.animatedHershey.putText(null, false, "Hello, world!", {
cmap: FONT_HERSHEY.PLAIN,
align: "center"
});