Typing effect mimicking human behavior using TheatreJS

TheaterJS is a typing effect mimicking human behavior. This is an open source project and hosted on GitHub. Everything that is in this is demonstrated and explained in this codepen. The demo is also available on the TheaterJS page.

var theater = new TheaterJS();
    .describe("Vader", .8, "#vader")
    .describe("Luke", .6, "#luke");
    .write("Vader:Luke.", 600)
    .write("Luke:What?", 400)
    .write("Vader:I am...", 400, " your father.");
    .on("say:start, erase:start", function () {
      // add blinking caret
    .on("say:end, erase:end", function () {
      // remove blinking caret
    .on("*", function () {
      // do something

Documentation – https://github.com/Zhouzi/TheaterJS#documentation
GitHub – https://github.com/Zhouzi/TheaterJS

Leave a Comment

Your email address will not be published. Required fields are marked *