Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View paulklemm's full-sized avatar

Paul Klemm paulklemm

View GitHub Profile
@paulklemm
paulklemm / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@paulklemm
paulklemm / Shader_Error
Last active August 29, 2015 14:17
WebGL Shader Fehler
THREE.WebGLShader: gl.getShaderInfoLog() ERROR: 0:55: '*' : wrong operand types no operation '*' exists that takes a left-hand operand of type 'highp float' and a right operand of type 'const int' (or there is no acceptable conversion)
three.min.js:581 1: precision highp float;
2: precision highp int;
3:
4:
5: #define MAX_DIR_LIGHTS 0
6: #define MAX_POINT_LIGHTS 0
7: #define MAX_SPOT_LIGHTS 0
8: #define MAX_HEMI_LIGHTS 0
@paulklemm
paulklemm / RCube Shader
Created March 20, 2015 19:04
RCube Shader
<script type="x-shader/x-vertex" id="vertexshader">
attribute float alpha;
varying float vAlpha;
// Coloring: https://stackoverflow.com/questions/25740054/three-js-passing-vertex-colors-to-fragment-shader
varying vec3 vColor;
void main() {
vColor = color;
vAlpha = alpha;
@paulklemm
paulklemm / xshade-makeError
Created February 3, 2015 12:22
xshade 1.1 make error. OSX 10.102
xshade-1.1/ make
mkdir OBJ.Darwin64
Compiling xshade-main.cc
clang: warning: argument unused during compilation: '-fopenmp'
In file included from xshade-main.cc:12:
./xsh.h:18:17: error: unknown type name 'vec'; did you mean 'trimesh::vec'?
vector< vector<vec> > snormals;
^~~
trimesh::vec
../trimesh2/include/Vec.h:420:22: note: 'trimesh::vec' declared here
@paulklemm
paulklemm / gist:bcca6e5a5ffc37cca630
Created February 1, 2015 10:10
Enhancement reassemble chunks - How often does 'done' fire when file is larger than chunksize?
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
POST partly_done codeschool_1488.mp4 154430339-codeschool_1488mp4
@paulklemm
paulklemm / app.js
Created January 23, 2015 16:28
Flow.js Node Server renames the uploaded file but cannot emit the changed file name to the Javascript client.
process.env.TMPDIR = 'tmp'; // to avoid the EXDEV rename error, see http://stackoverflow.com/q/21071303/76173
var UPLOAD_DIR = 'uploads/';
var express = require('express');
var multipart = require('connect-multiparty');
var multipartMiddleware = multipart();
var flow = require('./flow-node.js')('tmp');
var fs = require('fs');
var crypto = require('crypto');
var path = require('path');
@paulklemm
paulklemm / Requirements for Regression Cube prototype
Created November 17, 2014 16:44
Requirements for Regression Cube prototype
# Requirements
- Volume Rendering
- Rendering of ~3,375,000 cubes
- Rendering as Pointcloud?
+ http://potree.org/wp/
+ http://threejs.org/examples/webgl_particles_random.html
- rendering of text labels in the scene
- transfer functions
- for 2D-transfer-functions
- brushing elements (shooting rays into the scene at mouse position and matching objects)
gistup
@paulklemm
paulklemm / LaTeX Gitignore
Created July 16, 2014 13:54
.gitignore file for use with LaTeX projects
*.acn
*.acr
*.alg
*.aux
*.bbl
*.blg
*.dvi
*.fdb_latexmk
*.glg
*.glo