Skip to content

Instantly share code, notes, and snippets.

@noboko
Created March 16, 2012 14:17
Show Gist options
  • Save noboko/2050245 to your computer and use it in GitHub Desktop.
Save noboko/2050245 to your computer and use it in GitHub Desktop.
plask
//require('plask');せずにPlask使ってみるテスト。
//timer回してみる。
var window = new PlaskRawMac.NSWindow(0,400,400,1,-1,0);
var canvas = new PlaskRawMac.SkCanvas(window);
var paint = new PlaskRawMac.SkPaint;
paint.setFill();
paint.setAntiAlias(true);
setInterval(function () {
paint.setColor(Math.floor(Math.random()*255), 0, 0, 255);
canvas.clear(230, 230, 230, 255);
canvas.drawCircle(paint, 200, 200, Math.floor(Math.random()*200));
window.blit();
},120);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment