Skip to content

Instantly share code, notes, and snippets.

View hcwiley's full-sized avatar

H. Cole Wiley hcwiley

View GitHub Profile
@donmccurdy
donmccurdy / DRACOLoader.patch
Last active September 25, 2023 13:49
THREE.GLTFLoader with Draco support in Node.js.
diff --git a/node_modules/three/examples/js/loaders/DRACOLoader.js b/NodeDRACOLoader.js
index 57767d7..cc46f2c 100644
--- a/node_modules/three/examples/js/loaders/DRACOLoader.js
+++ b/NodeDRACOLoader.js
@@ -14,10 +14,12 @@
//
'use strict';
+const decoder = require('draco3dgltf').createDecoderModule();
+
@donmccurdy
donmccurdy / FOO2GLTF.js
Last active August 1, 2023 06:53
Example Node.js glTF conversion script, using three.js.
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
const THREE = require('three');
const program = require('commander');
const Canvas = require('canvas');
const { Blob, FileReader } = require('vblob');
// Patch global scope to imitate browser environment.
@hcwiley
hcwiley / add
Created June 1, 2012 21:37
add to mongodb
curl -v -H "Accept: application/json" -H "Content-type: application/json" -X POST -d ' {"title":"boo","description":"hahaha"}' -X POST http://localhost:8080/api/lesson
# With this setup, your OAuth URLs will be:
Request Token URL: /oauth/request_token/
User Authorization URL: /oauth/authorize/, using HTTP GET.
Access Token URL: /oauth/access_token/
@zackdever
zackdever / .vimrc
Created September 23, 2011 03:09
.vimrc for ubuntu
""" Vundle """""""""""""""""""""""""""""""""""""""""""""
"
" Brief help
" :BundleList - list configured bundles
" :BundleInstall(!) - install(update) bundles
" :BundleSearch(!) foo - search(or refresh cache first) for foo
" :BundleClean(!) - confirm(or auto-approve) removal of unused bundles
"
" see :h vundle for more details or wiki for FAQ
" NOTE: comments after Bundle command are not allowed..