diff options
Diffstat (limited to 'experimental/SkV8Example/sample.js')
-rw-r--r-- | experimental/SkV8Example/sample.js | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/experimental/SkV8Example/sample.js b/experimental/SkV8Example/sample.js index 3a95e55106..b516062044 100644 --- a/experimental/SkV8Example/sample.js +++ b/experimental/SkV8Example/sample.js @@ -4,10 +4,17 @@ var onDraw = function(){ var tick = 0; function f(canvas) { - tick += 0.01; + tick += 0.1; canvas.fillStyle = '#0000ff'; canvas.fillRect(100, 100, Math.sin(tick)*100, Math.cos(tick)*100); - canvas.inval(); }; return f; }(); + +function onTimeout() { + inval(); + print("Got a timeout!"); + setTimeout(onTimeout, 33); +} + +setTimeout(onTimeout, 33); |