dmotz / TuringType

⌨️ Simple human typing effect

Home Page:http://oxism.com/TuringType

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TuringType

A naïve human typing simulation effect

Dan Motzenbecker, MIT License

@dcmotz

Written quickly to scratch an itch; not intended to be an accurate algorithm.

Watch the demo to see what it does.

Usage:

new TuringType(domElement, 'Just some text.');

With some options:

new TuringType(domElement, 'Terrible but fast typist.', {
  accuracy: 0.3,
  interval: 20,
  callback: allDone
});

You can also clear the input in a natural manner with .clear():

var typer = new TuringType(element, "let's season their broth", {
  callback: function() {setTimeout(typer.clear, 1000)}
});

clear() is automatically bound to instances and accepts an optional integer indicating the number of characters to remove.

Have fun.

About

⌨️ Simple human typing effect

http://oxism.com/TuringType

License:MIT License


Languages

Language:CoffeeScript 67.0%Language:HTML 33.0%