xxxxxxxxxx
var program;
function setup() {
pixelDensity(1);
createCanvas(windowWidth, windowHeight,WEBGL);
rectMode(CENTER);
noStroke();
fill(204);
program = new p5.Shader(this._renderer,vert,frag);
}
function draw() {
this.shader(program);
background(0);
program.setUniform('resolution',[width,height]);
program.setUniform('time',millis()/1000);
program.setUniform('second',second());
rect(0,0,width,height);
}
(function () {
var loadJS = function(filename){
var meta = document.createElement("meta");
meta.setAttribute("name","viewport");
meta.setAttribute("content", "user-scalable=no,initial-scale=1,maximum-scale=1,minimum-scale=1,width=device-width");
// document.getElementsByTagName("meta")[0].appendChild(meta);
}
loadJS("https://rawgit.com/diwi/p5.EasyCam/master/p5.easycam.js");
document.oncontextmenu = function() { return false; }
document.onmousedown = function() { return false; }
})();