mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-11-13 04:36:12 +01:00
feat: switch to array buffer
This commit is contained in:
1 parent
9cfa2357b0
commit
cb2846a256
7 files changed
+45
-53
No files matched your search
@@ -89,9 +89,9 @@ export class ScgReadStream extends ScpgReadStream {
|
||||
);
|
||||
const strideBasedSize = stride * polygonGroupRaw.vertexCount;
|
||||
|
||||
if (verticesStream.buffer.length !== strideBasedSize) {
|
||||
if (verticesStream.buffer.byteLength !== strideBasedSize) {
|
||||
console.warn(
|
||||
`Vertex stride mismatch; expected ${strideBasedSize}, got ${verticesStream.buffer.length}; skipping...`,
|
||||
`Vertex stride mismatch; expected ${strideBasedSize}, got ${verticesStream.buffer.byteLength}; skipping...`,
|
||||
);
|
||||
|
||||
return;
|
||||
@@ -104,10 +104,6 @@ export class ScgReadStream extends ScpgReadStream {
|
||||
}));
|
||||
}
|
||||
|
||||
if (verticesStream.readRemainingLength() !== 0) {
|
||||
throw new RangeError('Vertices stream was not fully consumed');
|
||||
}
|
||||
|
||||
polygonGroups.set(polygonGroupRaw['#id'].readBigUInt64LE(), {
|
||||
vertices,
|
||||
indices,
|
||||
|
||||
Reference in new issue
Block a user