Skip to content

Instantly share code, notes, and snippets.

@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();
+