TheaterJS – Simulate human typing effect

Posted on

The TheaterJS simulates a human which is typing, by using a effect similar to typing on a typewriter.

The plugin also simulates error inputs and occasionally types in the wrong letter to perfect the simulation.

On the demo page of the plugin you can view the conversation between Luke and Darth Vader in Star Wars VI.

var theater = new TheaterJS();

  .describe("Vader", { speed: .8, accuracy: .6, invincibility: 4 }, "#vader")
  .describe("Luke", .6, "#luke");

You can set the accuracy and invincibility (Number of characters the actor can type without error) for each actor.



Leave a Reply