mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-22 07:24:26 +01:00
starting work on glb(s) management 2
This commit is contained in:
@@ -51,7 +51,6 @@ async function singleBlob(reader: ReadableStream<Uint8Array>, stopAfter: number
|
|||||||
// Make sure the reader reads the entire stream at once.
|
// Make sure the reader reads the entire stream at once.
|
||||||
const readerImpl = reader.getReader();
|
const readerImpl = reader.getReader();
|
||||||
let bufferedChunks: Uint8Array = new Uint8Array();
|
let bufferedChunks: Uint8Array = new Uint8Array();
|
||||||
try {
|
|
||||||
let done = false;
|
let done = false;
|
||||||
let length = 0;
|
let length = 0;
|
||||||
while (!done) {
|
while (!done) {
|
||||||
@@ -71,9 +70,6 @@ async function singleBlob(reader: ReadableStream<Uint8Array>, stopAfter: number
|
|||||||
}
|
}
|
||||||
done = d;
|
done = d;
|
||||||
}
|
}
|
||||||
} finally {
|
|
||||||
await readerImpl.cancel();
|
|
||||||
}
|
|
||||||
return new ReadableStream<Uint8Array>({
|
return new ReadableStream<Uint8Array>({
|
||||||
start(controller) {
|
start(controller) {
|
||||||
controller.enqueue(bufferedChunks);
|
controller.enqueue(bufferedChunks);
|
||||||
|
|||||||
Reference in New Issue
Block a user