Skip to content
Snippets Groups Projects
Commit 4f97b683 authored by DESKTOP-O6LIMN9\ludov's avatar DESKTOP-O6LIMN9\ludov
Browse files

eslint formating

parent 5ab0dfab
No related branches found
No related tags found
No related merge requests found
......@@ -41,12 +41,11 @@ export interface Packing {
ingredients: { [key: string]: Ingredient }
}
export interface Positions
{
export interface Positions {
coords?: Vec3[];
}
export interface Radii
{
export interface Radii {
radii?: number[];
}
......@@ -54,14 +53,18 @@ export interface Ingredient {
source: IngredientSource;
results: [Vec3, Quat][];
name: string;
positions?: [Positions];//Vec3[]];CoarseGraind Beads coordinates LOD
radii?: [Radii];//number[]];CoarseGraind Beads radii LOD
/** Vec3[]];CoarseGraind Beads coordinates LOD */
positions?: [Positions];
/** number[]];CoarseGraind Beads radii LOD */
radii?: [Radii];
/** Number of `curveX` properties in the object where `X` is a 0-indexed number */
nbCurve?: number;
/** Curve properties are Vec3[] but that is not expressable in TypeScript */
[curveX: string]: unknown;
principalAxis?: Vec3; /** the orientation in the membrane */
offset?: Vec3; /**offset along membrane */
/** the orientation in the membrane */
principalAxis?: Vec3;
/** offset along membrane */
offset?: Vec3;
}
export interface IngredientSource {
......
......@@ -389,10 +389,9 @@ async function loadMembrane(name: string, plugin: PluginContext, runtime: Runtim
const url = `${params.baseUrl}/membranes/${name}.bcif`
//
const file = (ingredientFiles)?ingredientFiles[fname]:null;
let membrane
if (!file)
// can we check if url exist
{
let membrane
if (!file) {
membrane = await state.build().toRoot()
.apply(StateTransforms.Data.Download, { label: name, url, isBinary: true }, { state: { isGhost: true } })
.apply(StateTransforms.Data.ParseCif, undefined, { state: { isGhost: true } })
......@@ -400,8 +399,7 @@ async function loadMembrane(name: string, plugin: PluginContext, runtime: Runtim
.apply(StateTransforms.Model.ModelFromTrajectory, undefined, { state: { isGhost: true } })
.apply(StateTransforms.Model.StructureFromModel)
.commit()
}
else {
} else {
membrane = await state.build().toRoot()
.apply(StateTransforms.Data.ReadFile, { file, isBinary: true, label: file.name }, { state: { isGhost: true } })
.apply(StateTransforms.Data.ParseCif, undefined, { state: { isGhost: true } })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment