Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
}
})
removedBufferViews.push(bufferViewIndex);
});
});
// Removed emptied bufferviews.
removedBufferViews.sort((a, b) => a > b ? -1 : 1);
removedBufferViews.forEach((index) => GLTFUtil.removeBufferView(container, index));
// Remove initial buffer, if empty.
const buffer = json.buffers[0];
if (buffer.byteLength === 0) {
GLTFUtil.removeBuffer(container, 0);
}
return container;
}