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
/* | |
Exports a multi-language copy deck into individual JSON files | |
Expects data in this format | |
Key | en | fr | |
--------------------------- | |
TITLE | Welcome | Bienvenue | |
Which exports en.js and fr.json |
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
// Based on https://github.com/lukejacksonn/servor | |
// For direct use | |
// node server ${process.cwd()} 8080 --debug | |
// node server ${process.cwd()} | |
const args = process.argv.slice(2).filter((x) => x.indexOf('-') !== 0); | |
const root = args[0]; | |
const port = args[1]; | |
const debug = ~process.argv.indexOf('--debug') || ~process.argv.indexOf('-d'); |
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
// Author: Nathan Gordon | |
// Title: Raytrace Background for http://patriciogonzalezvivo.github.io/glslEditor/ | |
#ifdef GL_ES | |
precision mediump float; | |
#endif | |
uniform vec2 u_resolution; | |
uniform vec2 u_mouse; | |
uniform float u_time; |
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
uniform sampler2D depths; | |
uniform sampler2D wc_normals; | |
uniform sampler2D random_texture; | |
uniform vec3 wc_camera_eye_position; | |
uniform floatz_far; | |
uniform vec2 tc_window; | |
uniform mat4 projection_matrix; |
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
/* | |
* | |
* Render current frame and check pixel | |
* transparency beneath mouse position. | |
* Threejs required. | |
* | |
*/ | |
var gl = renderer.context; | |
var rtTexture = new THREE.WebGLRenderTarget(WIDTH, HEIGHT, {minFilter: THREE.LinearFilter, magFilter: THREE.NearestFilter, format: THREE.RGBAFormat}); |
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
/* | |
* | |
* Use: | |
* var textPages = textToPages(myElement) | |
* returns array of strings. | |
* | |
*/ | |
var textToPages = function(element) { | |
var pages = []; |