Archived
feat: upgrade cabinet materials to MeshPhysicalMaterial for realistic transparency and implement hierarchy-based name matching
This commit is contained in:
1 parent
b9ff899a23
commit
26fdb2b675
8 files changed
+1252
-46
No files matched your search
@@ -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');
|
||||
Reference in new issue
Block a user