Created
March 16, 2012 14:17
-
-
Save noboko/2050245 to your computer and use it in GitHub Desktop.
plask
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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