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
const fs = require('fs'); | |
const { exec } = require('child_process'); | |
const path = require('path'); | |
process.chdir(__dirname); | |
const args = process.argv.slice(2); | |
if (args.length === 0) { | |
console.error("Usage: {in_file} {out_file}"); | |
process.exit(1); |
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
#include <string> | |
#include <memory> | |
#include <fstream> | |
#include <cerrno> | |
#include <algorithm> | |
#include <cassert> | |
#include <iostream> | |
static constexpr char PKM_FILE_EXTENSION[] = "pkm"; | |
static constexpr size_t PKM_HEADER_SIZE = 16; |
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
#ifdef VERTEX_SHADER | |
/*--------------------------------------------------------------------------------------------------------------------*/ | |
// VERTEX SHADER | |
/*--------------------------------------------------------------------------------------------------------------------*/ | |
precision highp float; | |
attribute vec4 aPosition; | |
attribute vec2 aTexCoord; |
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
function encode(column){ | |
const out = [0,0,0,0]; | |
for(let i = 0; i < 8; ++i){ | |
out[0] |= column[i+0 ] << i; | |
out[1] |= column[i+8 ] << i; | |
out[2] |= column[i+16] << i; | |
} | |
out[3] = column[column.length - 1] << 0; | |
return out; | |
} |
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
ffmpeg -r 30 -f image2 -s 9200x1080 -i prototype-%04d.png -pix_fmt yuv420p test.mp4 |
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
/** * | |
* @param {String} a - hex | |
* @param {String} b - hex | |
* @param {Number} x - interpolation step | |
* @example | |
* const result = lerpedHexGamma('#0000ff','#ff0000',0.5) | |
*/ | |
function lerpedHexGamma(a,b,x){ | |
const gamma = 2.2; | |
const _1_gamma = 1.0 / gamma; |
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
ffmpeg -i in.mov -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - | convert -delay 5 -layers Optimize -loop 0 - out.gif |
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
var Context = require('pex-context/Context'); | |
var isBrowser = require('is-browser'); | |
var EventDispatcher = require('./EventDispatcher'); | |
var WindowEvent = require('./WindowEvent'); | |
var WindowBrowser = require('./WindowBrowser'); | |
var WindowPlask = require('./WindowPlask'); | |
var ResourceLoader = require('./ResourceLoader'); | |
var Time = require('./Time'); | |
var Mouse = require('./Mouse'); | |
var MouseEvent = require('./MouseEvent'); |
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
// Remove everything from 3ds Max obj except vertices,indices & groups | |
var colors = require('colors'), | |
argv = require('minimist')(process.argv.slice(2),{string:['o']}), | |
fs = require('fs'), | |
path = require('path'); | |
function logUsageAndExit(){ | |
console.log(('Usage: [pathTo3dsMaxObjFile] -o [pathToOutObjFile] [-m] [-p]').yellow); | |
process.exit(); |
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
// Converts 3ds Max .obj to valid general .obj file. | |
var colors = require('colors'), | |
argv = require('minimist')(process.argv.slice(2),{string:['o']}), | |
fs = require('fs'), | |
path = require('path'); | |
function logUsageAndExit(){ | |
console.log(('Usage: [pathTo3dsMaxObjFile] -o [pathToOutObjFile] [-m] [-p]').yellow); | |
process.exit(); |
NewerOlder