- π±οΈ Left Click: Rotate | π±οΈ Right Click: Pan | βοΈ Scroll: Zoom
+
-
+
+ π±οΈ Click to interact | Right-click to pan | Simulator on the right
+
+
+
+
+
+
\ No newline at end of file
diff --git a/list_names.js b/list_names.js
new file mode 100644
index 0000000..a0e8140
--- /dev/null
+++ b/list_names.js
@@ -0,0 +1,21 @@
+const fs = require('fs');
+
+function listAllNames(filePath) {
+ const buffer = fs.readFileSync(filePath);
+
+ // Simple way to find names in a GLB: look for the JSON chunk
+ const jsonBuf = buffer.slice(20, 20 + buffer.readUInt32LE(12));
+ const gltf = JSON.parse(jsonBuf.toString());
+
+ console.log('--- MESHES ---');
+ if (gltf.meshes) {
+ gltf.meshes.forEach(m => console.log(m.name));
+ }
+
+ console.log('\n--- NODES ---');
+ if (gltf.nodes) {
+ gltf.nodes.forEach(n => console.log(n.name));
+ }
+}
+
+listAllNames('Cabinet v2.5 con eje.glb');
diff --git a/print_hierarchy.js b/print_hierarchy.js
new file mode 100644
index 0000000..99464f4
--- /dev/null
+++ b/print_hierarchy.js
@@ -0,0 +1,7 @@
+import * as THREE from 'three';
+import { GLTFLoader } from 'three/addons/loaders/GLTFLoader.js';
+import fs from 'fs';
+
+// To run this in node, I need to do something simpler since I don't have a DOM.
+// Actually, let's just use `parse` from gltf-pipeline or just regular expression on the JSON string.
+// I will just read the GLB JSON header.