This file contains 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
const createREGL = require('regl') | |
const mat4 = require('gl-mat4') | |
const { LineBuilder } = require('regl-line-builder') | |
const regl = createREGL() | |
const setupCamera = regl({ | |
uniforms: { | |
view: mat4.identity([]), | |
projection: ({ viewportWidth, viewportHeight }) => { | |
const w = viewportWidth / 2 |
This file contains 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
const createREGL = require('regl') | |
const mat4 = require('gl-mat4') | |
const { LineBuilder } = require('regl-line-builder') | |
const regl = createREGL() | |
const setupCamera = regl({ | |
uniforms: { | |
view: mat4.identity([]), | |
projection: ({ viewportWidth, viewportHeight }) => { | |
const w = viewportWidth / 2 |
This file contains 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
fetch(urlToFloatFile) | |
.then((res) => res.arrayBuffer()) | |
.then((buffer) => { | |
var floatBuffer = new Float32Array(buffer) | |
console.log(floatBuffer) | |
}) |
This file contains 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
(function() { | |
var VERSION = '0.0.16'; | |
if (Ember.libraries) { | |
Ember.libraries.register('Ember Model', VERSION); | |
} | |
})(); |
This file contains 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
.liquid-container { | |
position: relative; | |
overflow: hidden; | |
/* without this, overflow:hidden won't take effect because the things | |
we're trying to hide are on a separate accelerated | |
context. Also, this prevents a tiny vertical jump when the | |
content switches to accelerated. */ | |
-webkit-transform: translateY(0); | |
-moz-transform: translateY(0); |
This file contains 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
# /bin/sh | |
IFS=$'\n' | |
authors=$(git log --format='%aN' | sort -u) | |
for author in $authors | |
do | |
echo $author | awk 'BEGIN { FS = "\" " }; { printf "%-20s ", $1 }' | |
git log --author="$author" --pretty=tformat: --numstat | | |
awk '{ add += $1; subs += $2; edits += $1 + $2 } END { printf "%10d (+) %10s (-) %10s (+/-) \n", add, subs, edits }' |
This file contains 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
.liquid-container { | |
position: relative; | |
overflow: hidden; | |
/* without this, overflow:hidden won't take effect because the things | |
we're trying to hide are on a separate accelerated | |
context. Also, this prevents a tiny vertical jump when the | |
content switches to accelerated. */ | |
-webkit-transform: translateY(0); | |
-moz-transform: translateY(0); |
This file contains 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
var get = Ember.get; | |
var set = Ember.set; | |
var HardLocation = App.HardLocation = Ember.Object.extend({ | |
init : function() { | |
return set(this, 'location', get(this, 'location') || window.location); | |
}, | |
getURL : function() { | |
var location = get(this, 'location'); |
This file contains 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
// Overwrite p2.Narrowphase.prototype.circleHeightfield | |
// Solves circle / heightfield collision with interpolated curve | |
// e.g. http://jsbin.com/mifixo/9/ | |
/*jshint camelcase:false, maxparams: 15, maxcomplexity:15*/ | |
var vec2 = p2.vec2; | |
var add = vec2.add; | |
var sub = vec2.sub; | |
var circleHeightfield_candidate = vec2.create(); |
This file contains 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
#! /bin/sh | |
# usage: | |
# $ blender-upgrade $version | |
VERSION=$1 | |
SRC=~/Dropbox/config/blender/ | |
DEST=/Applications/Blender/Blender.app/Contents/Resources/$VERSION/scripts/ | |
cd $SRC; | |
for d in * |