Skip to content

Instantly share code, notes, and snippets.

Avatar

nicolas garcia belmonte philogb

View GitHub Profile
View gist:203fb705d82013f5e0ef
https://vine.co/pxlwrx
https://vine.co/u/936947234963095552
https://vine.co/Tragic.Tofu
https://vine.co/Le.Seb.Ettinger
https://vine.co/stonebizone
https://vine.co/u/909047515024867328
View gist:4773616
function inherit(from, to) {
function F() {}
F.prototype = from.prototype;
to.prototype = new F();
}
var Animal = function() {
};
View multipass.js
window.addEventListener('load', function() {
var section = document.querySelector('div.main'),
args = document.querySelector('div.arguments'),
controls = document.querySelector('.controls'),
image = args.querySelector('img'),
video = args.querySelector('video'),
log = $('log'),
useBloomX = true,
useBloomY = true,
useBlending = true;
View simple.js
window.addEventListener('DOMContentLoaded', function() {
//check support
if (!supportsWebGL()) {
$('webgl-canvas').innerHTML = 'Your browser doesn\'t seem to support WebGL. More info <a href=\'http://get.webgl.org/\'>here</a>.';
return;
}
//get context
var canvas = $('webgl-canvas'),
gl = getWebGLContext(canvas);
View texImage2D.js
window.addEventListener('load', function() {
var section = document.querySelector('div.main'),
args = document.querySelector('div.arguments'),
image = args.querySelector('img'),
video = args.querySelector('video'),
log = $('log');
//check support
if (!supportsWebGL()) {
log.innerHTML = '<p class=\'error\'>Your browser doesn\'t seem to support WebGL. More info <a href=\'http://get.webgl.org/\'>here</a>.</p>';
View gist:3456540
Uncaught TypeError: Object [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object] has no method 'on'
View gist:1327673
* (asdf-install:install 'cl-ppcre)
Install where?
1) System-wide install:
System in /usr/local/Cellar/sbcl/1.0.52/lib/sbcl/site-systems/
Files in /usr/local/Cellar/sbcl/1.0.52/lib/sbcl/site/
2) Personal installation:
System in /Users/philogb/.sbcl/systems/
Files in /Users/philogb/.sbcl/site/
--> 1
Downloading 157665 bytes from http://weitz.de/files/cl-ppcre.tar.gz ...
View gist:1296654
PhiloGL.unpack();
function BrowserSize() {
return {
width: window.innerWidth || document.body.clientWidth,
height: window.innerHeight || document.body.clientHeight
};
}
var browserSize;
View gist:1271429
$(document).ready(function(){
var N = 1000, r = 5;
PhiloGL.unpack();
//Create cubes
var cubes = [];
for(var i=0; i<N; i++) {
var cube = new O3D.Cube({});
cube.colors = false;