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
28 function defaultSet(value) { }28 function defaultSet(value) { }
29 29
30 property var labelAreaWidthScale: 0.530 property var labelAreaWidthScale: 0.5
31
32 property bool integral: false31 property bool integral: false
33 property var valueVarGetter: defaultGet32
34 property var valueVarSetter: defaultSet33 property var valueVarSetter: defaultSet
35 // property string property34 property alias valueVar : sliderControl.value
36 property alias valueVar : sliderControl.value35
37 // property alias valueSetter : sliderControl.value
38 property alias min: sliderControl.minimumValue36 property alias min: sliderControl.minimumValue
39 property alias max: sliderControl.maximumValue37 property alias max: sliderControl.maximumValue
40 38
scripts/developer/utilities/render/lod.qml+20−31
@@ -42,17 +42,33 @@ Item { · 41 unmodified lines
42 checked: Render.getConfig("RenderMainView.DrawSceneOctree").enabled42 checked: Render.getConfig("RenderMainView.DrawSceneOctree").enabled
43 onCheckedChanged: { Render.getConfig("RenderMainView.DrawSceneOctree").enabled = checked }43 onCheckedChanged: { Render.getConfig("RenderMainView.DrawSceneOctree").enabled = checked }
44 }44 }
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
45 HifiControls.CheckBox {60 HifiControls.CheckBox {
61 id: autoLOD
46 boxSize: 2062 boxSize: 20
47 text: "Auto LOD"63 text: "Auto LOD"
48 checked: LODManager.automaticLODAdjust64 checked: LODManager.automaticLODAdjust
49 onCheckedChanged: { LODManager.automaticLODAdjust = (checked) }65 onCheckedChanged: { LODManager.automaticLODAdjust = (checked) }
50 }66 }
51property var lodObject: LODManager67
52
53 RichSlider {68 RichSlider {
69 visible: !LODManager.automaticLODAdjust
54 showLabel: true70 showLabel: true
55 label: "lodLevel"71 label: "LOD Level"
56 valueVar: LODManager["lodLevel"]72 valueVar: LODManager["lodLevel"]
57 valueVarSetter: (function (v) { LODManager["lodLevel"] = v })73 valueVarSetter: (function (v) { LODManager["lodLevel"] = v })
58 max: 1.074 max: 1.0
@@ -62,33 +78,6 @@ property var lodObject: LODManager · 3 unmodified lines
62 anchors.left: parent.left78 anchors.left: parent.left
63 anchors.right: parent.right 79 anchors.right: parent.right
64 }80 }
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
92 }81 }
93 82
94 Column {83 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