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
//Learning WebGL for Plask Lesson14 | |
//Learing WebGL : http://learningwebgl.com/blog/?page_id=1217 | |
//Github : https://github.com/gpjt/webgl-lessons (this script use 'earth.jpg' and 'earth-specular.gif') | |
// | |
//KeyMap | |
//zoom : qe, | |
//lighting : t, | |
//colorMap : y | |
//useColorMap : u, | |
//reset : r, |
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
//Learning WebGL for Plask Lesson16 | |
//Learing WebGL : http://learningwebgl.com/blog/?page_id=1217 | |
//Github : https://github.com/gpjt/webgl-lessons (this script use 'earth.jpg' , 'crate.gif' and 'macbook.json') | |
// | |
//Plask : http://www.plask.org/ | |
// | |
//俺俺でMat3とMat4.toInverseMat3()あたりを追記したものを使ってやりました。 | |
//元のplask.jsと区別つけるために同一フォルダから読み込むようにしてます。 | |
//尚、binary版とgithubの最新版で微妙にplask.jsの変更があるみたいなので、 | |
//plask_.js binary版用、plask.js github用としてます。 |
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
#ifdef GL_ES | |
precision highp float; | |
#endif | |
varying vec4 vColor; | |
void main(void) { | |
gl_FragColor = vColor; | |
} |
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
//npm install underscore | |
var plask = require('plask'); | |
_ = require('underscore'); | |
plask.simpleWindow({ | |
init: function() { | |
this.framerate(60); | |
this.paint.setFill(); // Fill is the default, so this is just for clarity. | |
this.paint.setAntiAlias(true); | |
}, |
OlderNewer