diff --git a/src/mol-io/reader/ply/parser.ts b/src/mol-io/reader/ply/parser.ts index 3ec43ccb94244b04e87618b100eaedcb65fa51d1..fb9c37684a1eb3bd0eeb89f1596cd995d7c635d8 100644 --- a/src/mol-io/reader/ply/parser.ts +++ b/src/mol-io/reader/ply/parser.ts @@ -139,11 +139,11 @@ function parseElements(state: State) { function getColumnSchema(type: PlyType): Column.Schema { switch (type) { - case 'char': case 'uchar': - case 'short': case 'ushort': - case 'int': case 'uint': + case 'char': case 'uchar': case 'int8': case 'uint8': + case 'short': case 'ushort': case 'int16': case 'uint16': + case 'int': case 'uint': case 'int32': case 'uint32': return Column.Schema.int - case 'float': case 'double': + case 'float': case 'double': case 'float32': case 'float64': return Column.Schema.float } } diff --git a/src/mol-io/reader/ply/schema.ts b/src/mol-io/reader/ply/schema.ts index 6f37e32235ae80212f4bbea65feb85ca3bdaf8b8..bf23fbb703a9cf64a1249ea4085f79a0c424ff90 100644 --- a/src/mol-io/reader/ply/schema.ts +++ b/src/mol-io/reader/ply/schema.ts @@ -17,7 +17,16 @@ export const PlyTypeByteLength = { 'int': 4, 'uint': 4, 'float': 4, - 'double': 8 + 'double': 8, + + 'int8': 1, + 'uint8': 1, + 'int16': 2, + 'uint16': 2, + 'int32': 4, + 'uint32': 4, + 'float32': 4, + 'float64': 8 } export type PlyType = keyof typeof PlyTypeByteLength export const PlyTypes = new Set(Object.keys(PlyTypeByteLength))