Skip to content

Commit

Permalink
Parameterization
Browse files Browse the repository at this point in the history
  • Loading branch information
noahlevenson committed Feb 8, 2018
1 parent c765197 commit 8c33f48
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
8 changes: 6 additions & 2 deletions lib/typpo.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
*
* Typpo.js
* A JavaScript library for procedurally animating lifelike lousy typing
* A JavaScript library for procedurally animating lifelike derpy typing
* by Noah Levenson
*
* https://github.com/noahlevenson/typpo.js
Expand Down Expand Up @@ -135,6 +135,10 @@ function Typpo(options) {
}

this.backspaceSlowness = 1000 - (this.correctionSpeed * 10);

this.randomMax = 1;

this.randomMin = 0.5;

}

Expand Down Expand Up @@ -237,7 +241,7 @@ Typpo.prototype.write = function(s) {

}.bind({self: this.self, s: this.s, pos: this.pos}));

}.bind({self: this.self, s: this.s, pos: this.pos}), (Math.random() * (1.0 - 0.5) + 0.5) * this.self.backspaceSlowness);
}.bind({self: this.self, s: this.s, pos: this.pos}), (Math.random() * (this.self.randomMax - this.self.randomMin) + this.self.randomMin) * this.self.backspaceSlowness);

}

Expand Down
9 changes: 5 additions & 4 deletions lib/typpo.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "typpo.js",
"version": "1.0.2",
"description": "A library for procedurally animating lifelike lousy typing",
"version": "1.0.3",
"description": "A library for procedurally animating lifelike derpy typing",
"main": "lib/typpo.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down

0 comments on commit 8c33f48

Please sign in to comment.