COmmit manual

This commit is contained in:
MartinSereyC committed 2026-03-18 13:18:52 -03:00
1 parent 73973720a5
commit 92c8142f5a
6 files changed
+226 -12

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
const fs = require('fs');
function checkIndices(filePath) {
const buffer = fs.readFileSync(filePath);
const jsonLen = buffer.readUInt32LE(12);
const jsonBuf = buffer.slice(20, 20 + jsonLen);
const gltf = JSON.parse(jsonBuf.toString());
[37, 41].forEach(idx => {
console.log(`Node [${idx}]:`, gltf.nodes[idx] ? gltf.nodes[idx].name : 'OUT OF RANGE');
if (gltf.nodes[idx] && gltf.nodes[idx].mesh !== undefined) {
const meshIdx = gltf.nodes[idx].mesh;
console.log(` Mesh [${meshIdx}]:`, gltf.meshes[meshIdx].name);
}
});
[37, 41].forEach(idx => {
console.log(`Mesh [${idx}]:`, gltf.meshes[idx] ? gltf.meshes[idx].name : 'OUT OF RANGE');
});
}
checkIndices('Cabinet v2.5 con eje.glb');