History

working on the LOD behavior

Sam Gateau committed 8 years ago

Commit 57fd8241 parent cee9b902 files · +23 −36Browse files

Showing the changes to scripts/developer (2 of 2 files). Show all

Unified · Split

2 files
  1. scripts/developer/utilities/render/configSlider/RichSlider.qml +3 −5
  2. scripts/developer/utilities/render/lod.qml +20 −31
scripts/developer/utilities/render/configSlider/RichSlider.qml+3−5
@@ -28,13 +28,11 @@ Item { · 27 unmodified lines
2828 function defaultSet(value) { }
2929
3030 property var labelAreaWidthScale: 0.5
31−
3231 property bool integral: false
33− property var valueVarGetter: defaultGet
32+
3433 property var valueVarSetter: defaultSet
35− // property string property
36− property alias valueVar : sliderControl.value
37− // property alias valueSetter : sliderControl.value
34+ property alias valueVar : sliderControl.value
35+
3836 property alias min: sliderControl.minimumValue
3937 property alias max: sliderControl.maximumValue
4038
scripts/developer/utilities/render/lod.qml+20−31
@@ -42,17 +42,33 @@ Item { · 41 unmodified lines
4242 checked: Render.getConfig("RenderMainView.DrawSceneOctree").enabled
4343 onCheckedChanged: { Render.getConfig("RenderMainView.DrawSceneOctree").enabled = checked }
4444 }
45+
46+ RichSlider {
47+ showLabel: true
48+ showValue: false
49+ label: "World Quality"
50+ valueVar: LODManager["worldDetailQuality"]
51+ valueVarSetter: (function (v) { LODManager["worldDetailQuality"] = v })
52+ max: 0.75
53+ min: 0.25
54+ integral: false
55+
56+ anchors.left: autoLOD.left
57+ anchors.right: parent.right
58+ }
59+
4560 HifiControls.CheckBox {
61+ id: autoLOD
4662 boxSize: 20
4763 text: "Auto LOD"
4864 checked: LODManager.automaticLODAdjust
49− onCheckedChanged: { LODManager.automaticLODAdjust = (checked) }
65+ onCheckedChanged: { LODManager.automaticLODAdjust = (checked) }
5066 }
51−property var lodObject: LODManager
52−
67+
5368 RichSlider {
69+ visible: !LODManager.automaticLODAdjust
5470 showLabel: true
55− label: "lodLevel"
71+ label: "LOD Level"
5672 valueVar: LODManager["lodLevel"]
5773 valueVarSetter: (function (v) { LODManager["lodLevel"] = v })
5874 max: 1.0
@@ -62,33 +78,6 @@ property var lodObject: LODManager · 3 unmodified lines
6278 anchors.left: parent.left
6379 anchors.right: parent.right
6480 }
65− RichSlider {
66− showLabel: true
67− // config: lodObject
68− // property: "worldDetailQuality"
69− // valueVar: LODManager["worldDetailQuality"]
70− label: "World Quality"
71− valueVar: LODManager["worldDetailQuality"]
72− // valueVarGetter: { return LODManager["worldDetailQuality"] }
73− valueVarSetter: (function (v) { LODManager["worldDetailQuality"] = v })
74− max: 0.75
75− min: 0.25
76− integral: false
77−
78− anchors.left: parent.left
79− anchors.right: parent.right
80− }
81− /* HifiControls.Slider {
82− id: sliderControl
83− stepSize: 0.0
84− minimumValue: 0.0
85− maximumValue: 1.2
86− anchors.left: parent.left
87− anchors.right: parent.right
88− value: LODManager["lodLevel"]
89− onValueChanged: { LODManager["lodLevel"] = value }
90− }*/
91−
9281 }
9382
9483 Column {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t