mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:27:08 +00:00
Add support for type 4 decoding
This commit is contained in:
@@ -84,8 +84,12 @@ const DougalBinaryLoader = {
|
||||
for (let k = 0; k < values.length; k++) {
|
||||
values[k] = new (k === 0 ? Uint16Array : k === 1 ? Uint32Array : k === 2 ? BigUint64Array : Float32Array)(totalCount);
|
||||
}
|
||||
} else if (udv == 4) {
|
||||
for (let k = 0; k < values.length; k++) {
|
||||
values[k] = new (k === 0 ? Uint16Array : k === 1 ? Uint32Array : k === 2 ? Uint16Array : Float32Array)(totalCount);
|
||||
}
|
||||
} else {
|
||||
throw new Error(`Invalid udv: Expected 0, 1, or 2; found ${udv}`);
|
||||
throw new Error(`Invalid udv: Expected 0, 1, 2, or 4; found ${udv}`);
|
||||
}
|
||||
|
||||
let offset = 0;
|
||||
@@ -110,7 +114,7 @@ const DougalBinaryLoader = {
|
||||
offset += chunk.jCount;
|
||||
}
|
||||
|
||||
console.log(`Parsed ${totalCount} points, ${values.length} value arrays`);
|
||||
console.log(`Parsed ${totalCount} points, ${values.length} value arrays, udv = ${udv}`);
|
||||
|
||||
const attributes = {
|
||||
getPosition: {
|
||||
|
||||
Reference in New Issue
Block a user