@loaders.gl/obj
Version:
Framework-independent loader for the OBJ format
26 lines (25 loc) • 623 B
JavaScript
// __VERSION__ is injected by babel-plugin-version-inline
// @ts-ignore TS2304: Cannot find name '__VERSION__'.
const VERSION = typeof "4.3.3" !== 'undefined' ? "4.3.3" : 'latest';
/**
* Worker loader for the OBJ geometry format
*/
export const OBJLoader = {
dataType: null,
batchType: null,
name: 'OBJ',
id: 'obj',
module: 'obj',
version: VERSION,
worker: true,
extensions: ['obj'],
mimeTypes: ['text/plain'],
testText: testOBJFile,
options: {
obj: {}
}
};
function testOBJFile(text) {
// TODO - There could be comment line first
return text[0] === 'v';
}