drop interval/timeout funs. Modify traffic light example

This commit is contained in:
pTalanov
2012-05-31 20:10:19 +04:00
parent 44c0baa9e1
commit 5fa3e96e4b
6 changed files with 431 additions and 412 deletions
@@ -29,15 +29,15 @@ class FancyLines() {
var hue = 0;
fun line() {
context.save()
context.save();
context.beginPath()
context.beginPath();
context.lineWidth = 20.0 * Math.random()
context.lineWidth = 20.0 * Math.random();
context.moveTo(x.toInt(), y.toInt());
x = width * Math.random();
y = height * Math.random()
y = height * Math.random();
context.bezierCurveTo(width * Math.random(), height * Math.random(),
width * Math.random(), height * Math.random(), x, y);
@@ -60,7 +60,7 @@ class FancyLines() {
}
fun run() {
setInterval({line()}, 40);
setInterval({blank()}, 100);
window.setInterval({line()}, 40);
window.setInterval({blank()}, 100);
}
}