Skip to content

Commit

Permalink
docs(cursor): Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed Feb 26, 2016
1 parent 503ed20 commit b5cff01
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 11 deletions.
7 changes: 0 additions & 7 deletions examples/image.js

This file was deleted.

2 changes: 1 addition & 1 deletion examples/lucky.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ setInterval(() => {

cursor.moveTo(0, 0).flush();
offset++;
}, 1);
}, 150);
1 change: 1 addition & 0 deletions examples/smart-render.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ let x = 0;
let y = 0;

setInterval(() => {
cursor.moveTo(0, 0).background('white').foreground('black').write('This example shows how fast builds difference between two frames');
cursor.moveTo(x, y).background('yellow').foreground('black').write('ABCDEFGHIJKLMNOP');
cursor.moveTo(x * 2, y).background('yellow').foreground('black').write('ABCDEFGHIJKLMNOP');
cursor.moveTo(x * 3, y).background('yellow').foreground('black').write('ABCDEFGHIJKLMNOP');
Expand Down
4 changes: 2 additions & 2 deletions examples/spin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

const Cursor = require('../lib/Cursor');
const cursor = new Cursor().resetTTY().flush();
const cursor = new Cursor().resetTTY();
const radius = 10;
const colors = ['RED', 'YELLOW', 'GREEN', 'DARK_CYAN', 'BLUE', 'MAGENTA'];

Expand All @@ -21,4 +21,4 @@ setInterval(function () {
points = points.slice(0, 12 * colors.length - 1);

theta += Math.PI / 40;
}, 50);
}, 1);
2 changes: 1 addition & 1 deletion examples/write.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";

const Cursor = require('../lib/Cursor');
const cursor = new Cursor();
const cursor = new Cursor().resetTTY();

cursor.write('HELLO').flush();

0 comments on commit b5cff01

Please sign in to comment.