[Enhancement]: Support more data types in Draco decoder
ibgreen opened this issue · comments
Ib Green commented
Looks like we are not supporting Draco files with attributes of type of INT64, UINT64, FLOAT64, BOOL.
- The error is at
attribute.data_type
is10
andTypedArrayCtor
isundefined
.
dataType 10 is FLOAT64
We can see all the data types supported by Draco here:
https://github.com/google/draco/blob/7d58126d076bc3f5f9d8c114d1700b7311faecfe/src/draco/core/draco_types.h#L26.
const DRACO_DATA_TYPE_TO_TYPED_ARRAY_MAP = {
1: Int8Array,
2: Uint8Array,
3: Int16Array,
4: Uint16Array,
5: Int32Array,
6: Uint32Array,
9: Float32Array
};
DT_INVALID = 0,
DT_INT8 = 1,
DT_UINT8 = 2,
DT_INT16 = 3,
DT_UINT16 = 4,
DT_INT32 = 5,
DT_UINT32 = 6,
DT_INT64 = 7,
DT_UINT64 = 8,
DT_FLOAT32 = 9,
DT_FLOAT64 = 10,
DT_BOOL = 11,
Ib Green commented
Closing, will reopen if we get more information from Cesium and others on how these attributes are supposed to be handled, see attached PR