Skip to content

Instantly share code, notes, and snippets.

var plask = require('plask');
plask.simpleWindow({
settings:{
//type: '3d2d',
width : 800, height : 600,
//fullscreen: true,
//center: true,
//position: {x: 0, y: 0},
//title: "windowtitle"
var plask = require('plask');
plask.simpleWindow({
settings:{
width:1280,height:720,
type: '3d2d',
//fullscreen: true
},
syphon_server: 'PLASK',
init: function() {
var plask = require('plask');
//i used chaged plask.js
//add
//obj.path = new exports.SkPath;
//in simpleWindow()
plask.simpleWindow({
settings:{
// Plask.
// (c) Dean McNamee <[email protected]>, 2010.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to
// deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
// sell copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
//require('plask');せずにPlask使ってみるテスト。
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);
paint.setColor(80, 0, 0, 255);
canvas.clear(230, 230, 230, 255);
canvas.drawCircle(paint, 200, 200, 200);
//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 () {
@noboko
noboko / app.fshader
Created March 26, 2012 16:20
learning WebGL for plask 01
void main(void) {
gl_FragColor = vec4(1.0, 1.0, 1.0, 1.0);
}
@noboko
noboko / app.fshader
Created March 26, 2012 17:35
Learning WebGL for Plask Lesson02
#ifdef GL_ES
precision highp float;
#endif
varying vec4 vColor;
void main(void) {
gl_FragColor = vColor;
}
@noboko
noboko / app.fshader
Created March 26, 2012 18:41
Learning WebGL for Plask Lesson 03
#ifdef GL_ES
precision highp float;
#endif
varying vec4 vColor;
void main(void) {
gl_FragColor = vColor;
}
@noboko
noboko / app.fshader
Created March 26, 2012 20:31
Learning WebGL for Plask Lesson 04
#ifdef GL_ES
precision highp float;
#endif
varying vec4 vColor;
void main(void) {
gl_FragColor = vColor;
}