Ver Fonte

add missing , BaseGeometry.CustomQualityParamInfo

Alexander Rose há 5 anos atrás
pai
commit
28d3d5861a

+ 2 - 1
src/mol-repr/structure/visual/carbohydrate-symbol-mesh.ts

@@ -26,6 +26,7 @@ import { EmptyLoci, Loci } from '../../../mol-model/loci';
 import { VisualContext } from '../../../mol-repr/visual';
 import { Theme } from '../../../mol-theme/theme';
 import { getAltResidueLociFromId } from './util/common';
+import { BaseGeometry } from '../../../mol-geo/geometry/base';
 
 const t = Mat4.identity();
 const sVec = Vec3.zero();
@@ -162,7 +163,7 @@ function createCarbohydrateSymbolMesh(ctx: VisualContext, structure: Structure,
 
 export const CarbohydrateSymbolParams = {
     ...ComplexMeshParams,
-    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }),
+    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }, BaseGeometry.CustomQualityParamInfo),
     sizeFactor: PD.Numeric(1.75, { min: 0, max: 10, step: 0.01 }),
 };
 export type CarbohydrateSymbolParams = typeof CarbohydrateSymbolParams

+ 2 - 1
src/mol-repr/structure/visual/element-sphere.ts

@@ -10,12 +10,13 @@ import { UnitsMeshParams, UnitsSpheresParams, UnitsVisual, UnitsSpheresVisual, U
 import { WebGLContext } from '../../../mol-gl/webgl/context';
 import { createElementSphereImpostor, ElementIterator, getElementLoci, eachElement, createElementSphereMesh } from './util/element';
 import { VisualUpdateState } from '../../util';
+import { BaseGeometry } from '../../../mol-geo/geometry/base';
 
 export const ElementSphereParams = {
     ...UnitsMeshParams,
     ...UnitsSpheresParams,
     sizeFactor: PD.Numeric(1, { min: 0, max: 10, step: 0.1 }),
-    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }),
+    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }, BaseGeometry.CustomQualityParamInfo),
     ignoreHydrogens: PD.Boolean(false),
     traceOnly: PD.Boolean(false),
 };

+ 2 - 1
src/mol-repr/structure/visual/ellipsoid-mesh.ts

@@ -21,11 +21,12 @@ import { AtomSiteAnisotrop } from '../../../mol-model-formats/structure/property
 import { equalEps } from '../../../mol-math/linear-algebra/3d/common';
 import { addSphere } from '../../../mol-geo/geometry/mesh/builder/sphere';
 import { Sphere3D } from '../../../mol-math/geometry';
+import { BaseGeometry } from '../../../mol-geo/geometry/base';
 
 export const EllipsoidMeshParams = {
     ...UnitsMeshParams,
     sizeFactor: PD.Numeric(1, { min: 0, max: 10, step: 0.1 }),
-    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }),
+    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }, BaseGeometry.CustomQualityParamInfo),
     ignoreHydrogens: PD.Boolean(false),
 };
 export type EllipsoidMeshParams = typeof EllipsoidMeshParams

+ 3 - 2
src/mol-repr/structure/visual/orientation-ellipsoid-mesh.ts

@@ -21,11 +21,12 @@ import { EmptyLoci, Loci } from '../../../mol-model/loci';
 import { UnitIndex } from '../../../mol-model/structure/structure/element/element';
 import { LocationIterator } from '../../../mol-geo/util/location-iterator';
 import { MoleculeType } from '../../../mol-model/structure/model/types';
+import { BaseGeometry } from '../../../mol-geo/geometry/base';
 
 export const OrientationEllipsoidMeshParams = {
     ...UnitsMeshParams,
     sizeFactor: PD.Numeric(1, { min: 0, max: 2, step: 0.1 }),
-    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }),
+    detail: PD.Numeric(0, { min: 0, max: 3, step: 1 }, BaseGeometry.CustomQualityParamInfo),
 };
 export type OrientationEllipsoidMeshParams = typeof OrientationEllipsoidMeshParams
 
@@ -80,7 +81,7 @@ export function createOrientationEllipsoidMesh(ctx: VisualContext, unit: Unit, s
     const radiusScale = Vec3.create(size[2], size[1], size[0]);
 
     builderState.currentGroup = 0;
-    addEllipsoid(builderState, origin, dirA, dirB, radiusScale, detail);
+    addEllipsoid(builderState, origin, dirA, dirB, radiusScale, detail + 1);
 
     const m = MeshBuilder.getMesh(builderState);