Skip to content

A library for simulating typewriter effect in the browser

Notifications You must be signed in to change notification settings

mezklador/realistic-typewriter.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

realistic-typewriter.js

Build Status Dependency Status

A library for simulating typewriter effect in the browser.

Demo

Current version is 0.2. It is a complete rewrite of the previous version. The Documentation is still incomplete (look at the examples for now.)

v0.1 is available here.

Usage

var tw = typewriter(targetDomElement).withAccuracy(90)
                                     .withMinimumSpeed(5)
                                     .withMaximumSpeed(10)
                                     .build();

tw.clear()
  .put('$ ')
  .waitRange(1000, 2000)
  .type('whoami')
  .put('<br/>')
  .wait(2000)
  .put('realistic-typewriter.js', function () {
    console.log('yeah');
  })
  .put('<br/>')
  .waitRange(500, 1000)
  .put('$ ')
  .waitRange(1000, 2000)
  .type('exit', function () {
    console.log('finished');
  });

Showcase

Did something interesting with realistic-typewriter.js?

Feel free to add it here (or tweet me).

Installation

You can use this library with browserify or download a pre-compiled version (see below) from the project's releases page.

build/typewriter-bundle.js is the browserify bundle.
build/typewriter-bundle.min.js is the minified version of the browserify bundle.
build/typewriter-bundle-sa.js is the UMD browserify bundle.
build/typewriter-bundle-sa.min.js is the minified version of the UMD browserify bundle.

Building from source-code

Requirements

Node.js v0.10+

Instructions

  1. Clone the repository
  2. run npm install

Cake tasks

Install CoffeeScript globally and run cake to see available tasks.

Contributing

You are welcome to contribute via pull requests; fork the repository, make your changes and submit a pull request.

License

Copyright (c) 2013 Fardjad Davari

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A library for simulating typewriter effect in the browser

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • CoffeeScript 100.0%