diff --git a/src/mol-geo/geometry/geometry.ts b/src/mol-geo/geometry/geometry.ts index 5f75fc6c92a645593fec8bac8de3a883dee7d253..ceab1fe7c8474eb912f74ad286792f995118ab8d 100644 --- a/src/mol-geo/geometry/geometry.ts +++ b/src/mol-geo/geometry/geometry.ts @@ -86,9 +86,11 @@ export const VisualQualityInfo = { 'custom': {}, 'auto': {}, 'highest': {}, + 'higher': {}, 'high': {}, 'medium': {}, 'low': {}, + 'lower': {}, 'lowest': {}, } export type VisualQuality = keyof typeof VisualQualityInfo diff --git a/src/mol-geo/representation/util.ts b/src/mol-geo/representation/util.ts index dbcedd0636eedb1bd7a26b4c07be784967115336..c8a83cf50beb2a7186c793b003a97bf10f03f844 100644 --- a/src/mol-geo/representation/util.ts +++ b/src/mol-geo/representation/util.ts @@ -21,19 +21,23 @@ export function getQualityProps(props: Partial<QualityProps>, structure?: Struct let detail = defaults(props.detail, 1) let radialSegments = defaults(props.radialSegments, 12) let linearSegments = defaults(props.linearSegments, 8) - let resolution = defaults(props.resolution, 1) + let resolution = defaults(props.resolution, 2) if (quality === 'auto' && structure) { let score = structure.elementCount if (structure.isCoarse) score *= 10 if (score > 500_000) { quality = 'lowest' + } else if (score > 300_000) { + quality = 'lower' } else if (score > 100_000) { quality = 'low' } else if (score > 30_000) { quality = 'medium' - } else { + } else if (score > 2_000) { quality = 'high' + } else { + quality = 'higher' } } @@ -42,19 +46,25 @@ export function getQualityProps(props: Partial<QualityProps>, structure?: Struct detail = 3 radialSegments = 36 linearSegments = 18 + resolution = 0.3 + break + case 'higher': + detail = 3 + radialSegments = 28 + linearSegments = 14 resolution = 0.5 break case 'high': detail = 2 - radialSegments = 24 - linearSegments = 12 + radialSegments = 20 + linearSegments = 10 resolution = 1.0 break case 'medium': detail = 1 radialSegments = 12 linearSegments = 8 - resolution = 1.5 + resolution = 2.0 break case 'low': detail = 0 @@ -62,11 +72,17 @@ export function getQualityProps(props: Partial<QualityProps>, structure?: Struct linearSegments = 3 resolution = 3 break + case 'lower': + detail = 0 + radialSegments = 8 + linearSegments = 3 + resolution = 5 + break case 'lowest': detail = 0 radialSegments = 4 linearSegments = 2 - resolution = 6 + resolution = 8 break case 'custom': // use defaults or given props as set above