Skip to content

Commit

Permalink
docs(example): Add simple example how to use Kittik API
Browse files Browse the repository at this point in the history
  • Loading branch information
ghaiklor committed Dec 7, 2015
1 parent 0783a65 commit aa2b5d6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
work
build
docs
examples
src
test
pids
Expand Down
38 changes: 38 additions & 0 deletions examples/simple.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
var Presentation = require('../lib/Presentation').Presentation;
var COLORS = require('kittik-cursor').COLORS;

Presentation
.create([[{
name: 'Text',
options: {
text: 'Hello there!',
background: COLORS.YELLOW,
foreground: COLORS.BLACK,
animation: {
name: 'print'
}
}
}], [{
name: 'Text',
options: {
text: 'You can combine different shapes in one slide',
background: COLORS.YELLOW,
foreground: COLORS.BLACK,
animation: {
name: 'print',
interval: 10
}
}
}, {
name: 'Rectangle',
options: {
text: 'You can write text in the center of the rectangle',
width: 100,
height: 5,
x: 10,
y: 50,
background: COLORS.BLUE,
foreground: COLORS.WHITE
}
}]])
.run();

0 comments on commit aa2b5d6

Please sign in to comment.