molstar
Version:
A comprehensive macromolecular library.
31 lines (30 loc) • 1.13 kB
JavaScript
/**
* Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
*
* @author Alexander Rose <alexander.rose@weirdbyte.de>
*/
import { __awaiter, __generator } from "tslib";
import { ReaderResult as Result } from '../result';
import { Task } from '../../../mol-task';
import { Mesh } from '../../../mol-geo/geometry/mesh/mesh';
function parseInternal(data, ctx) {
return __awaiter(this, void 0, void 0, function () {
var mesh;
return __generator(this, function (_a) {
mesh = Mesh.createEmpty();
// Mesh.computeNormalsImmediate(mesh)
return [2 /*return*/, Result.success(mesh)];
});
});
}
export function parse(data) {
var _this = this;
return Task.create('Parse OBJ', function (ctx) { return __awaiter(_this, void 0, void 0, function () {
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, parseInternal(data, ctx)];
case 1: return [2 /*return*/, _a.sent()];
}
});
}); });
}