Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Molstar
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michal Malý
Molstar
Commits
f8ab02fd
Commit
f8ab02fd
authored
Dec 8, 2019
by
Alexander Rose
Browse files
Options
Downloads
Patches
Plain Diff
add doubleSided to quality props
parent
b75ba4b4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/mol-repr/util.ts
+11
-1
11 additions, 1 deletion
src/mol-repr/util.ts
with
11 additions
and
1 deletion
src/mol-repr/util.ts
+
11
−
1
View file @
f8ab02fd
...
@@ -50,6 +50,7 @@ export interface QualityProps {
...
@@ -50,6 +50,7 @@ export interface QualityProps {
radialSegments
:
number
radialSegments
:
number
linearSegments
:
number
linearSegments
:
number
resolution
:
number
resolution
:
number
doubleSided
:
boolean
}
}
export
function
getStructureQuality
(
structure
:
Structure
):
VisualQuality
{
export
function
getStructureQuality
(
structure
:
Structure
):
VisualQuality
{
...
@@ -76,6 +77,7 @@ export function getQualityProps(props: Partial<QualityProps>, data?: any) {
...
@@ -76,6 +77,7 @@ export function getQualityProps(props: Partial<QualityProps>, data?: any) {
let
radialSegments
=
defaults
(
props
.
radialSegments
,
12
)
let
radialSegments
=
defaults
(
props
.
radialSegments
,
12
)
let
linearSegments
=
defaults
(
props
.
linearSegments
,
8
)
let
linearSegments
=
defaults
(
props
.
linearSegments
,
8
)
let
resolution
=
defaults
(
props
.
resolution
,
2
)
let
resolution
=
defaults
(
props
.
resolution
,
2
)
let
doubleSided
=
defaults
(
props
.
doubleSided
,
true
)
if
(
quality
===
'
auto
'
&&
data
instanceof
Structure
)
{
if
(
quality
===
'
auto
'
&&
data
instanceof
Structure
)
{
quality
=
getStructureQuality
(
data
.
root
)
quality
=
getStructureQuality
(
data
.
root
)
...
@@ -87,42 +89,49 @@ export function getQualityProps(props: Partial<QualityProps>, data?: any) {
...
@@ -87,42 +89,49 @@ export function getQualityProps(props: Partial<QualityProps>, data?: any) {
radialSegments
=
36
radialSegments
=
36
linearSegments
=
18
linearSegments
=
18
resolution
=
0.1
resolution
=
0.1
doubleSided
=
true
break
break
case
'
higher
'
:
case
'
higher
'
:
detail
=
3
detail
=
3
radialSegments
=
28
radialSegments
=
28
linearSegments
=
14
linearSegments
=
14
resolution
=
0.3
resolution
=
0.3
doubleSided
=
true
break
break
case
'
high
'
:
case
'
high
'
:
detail
=
2
detail
=
2
radialSegments
=
20
radialSegments
=
20
linearSegments
=
10
linearSegments
=
10
resolution
=
0.5
resolution
=
0.5
doubleSided
=
true
break
break
case
'
medium
'
:
case
'
medium
'
:
detail
=
1
detail
=
1
radialSegments
=
12
radialSegments
=
12
linearSegments
=
8
linearSegments
=
8
resolution
=
1
resolution
=
1
doubleSided
=
true
break
break
case
'
low
'
:
case
'
low
'
:
detail
=
0
detail
=
0
radialSegments
=
8
radialSegments
=
8
linearSegments
=
3
linearSegments
=
3
resolution
=
2
resolution
=
2
doubleSided
=
false
break
break
case
'
lower
'
:
case
'
lower
'
:
detail
=
0
detail
=
0
radialSegments
=
4
radialSegments
=
4
linearSegments
=
2
linearSegments
=
2
resolution
=
4
resolution
=
4
doubleSided
=
false
break
break
case
'
lowest
'
:
case
'
lowest
'
:
detail
=
0
detail
=
0
radialSegments
=
2
radialSegments
=
2
linearSegments
=
1
linearSegments
=
1
resolution
=
8
resolution
=
8
doubleSided
=
false
break
break
case
'
custom
'
:
case
'
custom
'
:
// use defaults or given props as set above
// use defaults or given props as set above
...
@@ -133,6 +142,7 @@ export function getQualityProps(props: Partial<QualityProps>, data?: any) {
...
@@ -133,6 +142,7 @@ export function getQualityProps(props: Partial<QualityProps>, data?: any) {
detail
,
detail
,
radialSegments
,
radialSegments
,
linearSegments
,
linearSegments
,
resolution
resolution
,
doubleSided
}
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment