Open xeolabs opened 6 years ago
Describe the bug GLTFModel caches some typed array data for buffer views, which is never used.
Within GLTFModel's loadBufferView() function we need to remove the lines between the REMOVE comments below:
loadBufferView()
function loadBufferView(ctx, bufferViewInfo) { var buffer = ctx.json.buffers[bufferViewInfo.buffer]; bufferViewInfo._typedArray = null; var byteLength = bufferViewInfo.byteLength || 0; var byteOffset = bufferViewInfo.byteOffset || 0; bufferViewInfo._buffer = buffer._buffer.slice(byteOffset, byteOffset + byteLength); // REMOVE if (bufferViewInfo.target === 34963) { bufferViewInfo._typedArray = new Uint16Array(bufferViewInfo._buffer); } else if (bufferViewInfo.target == 34962) { bufferViewInfo._typedArray = new Float32Array(bufferViewInfo._buffer); / } else { } // REMOVE }
Expected behavior Less memory used while loading glTF files.
Describe the bug GLTFModel caches some typed array data for buffer views, which is never used.
Within GLTFModel's
loadBufferView()
function we need to remove the lines between the REMOVE comments below:Expected behavior Less memory used while loading glTF files.