Skip to content
Snippets Groups Projects
Commit fe43be78 authored by Alexander Rose's avatar Alexander Rose
Browse files

tweaked quality props

parent ccc6c10d
No related branches found
No related tags found
No related merge requests found
......@@ -27,10 +27,23 @@ interface QualityProps {
}
function getQualityProps(props: Partial<QualityProps>, structure: Structure) {
const quality = defaults(props.quality, 'auto' as VisualQuality)
let quality = defaults(props.quality, 'auto' as VisualQuality)
let detail = 1
let radialSegments = 12
if (quality === 'auto') {
const score = structure.elementCount
if (score > 500_000) {
quality = 'lowest'
} else if (score > 100_000) {
quality = 'low'
} else if (score > 30_000) {
quality = 'medium'
} else {
quality = 'high'
}
}
switch (quality) {
case 'highest':
detail = 3
......@@ -52,9 +65,6 @@ function getQualityProps(props: Partial<QualityProps>, structure: Structure) {
detail = 0
radialSegments = 3
break
case 'auto':
// TODO
break
case 'custom':
detail = defaults(props.detail, 1)
radialSegments = defaults(props.radialSegments, 12)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment