Showing the changes to scripts/developer (2 of 19 files). Show all
Unified · Split
| @@ -0,0 +1,20 @@ | |||
| 1 | // | ||
| 2 | // debugOutline.js | ||
| 3 | // developer/utilities/render | ||
| 4 | // | ||
| 5 | // Olivier Prat, created on 08/08/2017. | ||
| 6 | // Copyright 2017 High Fidelity, Inc. | ||
| 7 | // | ||
| 8 | // Distributed under the Apache License, Version 2.0. | ||
| 9 | // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html | ||
| 10 | // | ||
| 11 | |||
| 12 | // Set up the qml ui | ||
| 13 | var qml = Script.resolvePath('outline.qml'); | ||
| 14 | var window = new OverlayWindow({ | ||
| 15 | title: 'Outline', | ||
| 16 | source: qml, | ||
| 17 | width: 285, | ||
| 18 | height: 370, | ||
| 19 | }); | ||
| 20 | window.closed.connect(function() { Script.stop(); }); | ||
| @@ -0,0 +1,119 @@ | |||
| 1 | // | ||
| 2 | // outline.qml | ||
| 3 | // developer/utilities/render | ||
| 4 | // | ||
| 5 | // Olivier Prat, created on 08/08/2017. | ||
| 6 | // Copyright 2017 High Fidelity, Inc. | ||
| 7 | // | ||
| 8 | // Distributed under the Apache License, Version 2.0. | ||
| 9 | // See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html | ||
| 10 | // | ||
| 11 | import QtQuick 2.5 | ||
| 12 | import QtQuick.Controls 1.4 | ||
| 13 | import "configSlider" | ||
| 14 | |||
| 15 | Item { | ||
| 16 | id: root | ||
| 17 | property var debugConfig: Render.getConfig("RenderMainView.OutlineDebug") | ||
| 18 | property var drawConfig: Render.getConfig("RenderMainView.OutlineEffect") | ||
| 19 | |||
| 20 | Column { | ||
| 21 | spacing: 8 | ||
| 22 | |||
| 23 | CheckBox { | ||
| 24 | text: "View Outlined Depth" | ||
| 25 | checked: root.debugConfig["viewOutlinedDepth"] | ||
| 26 | onCheckedChanged: { | ||
| 27 | root.debugConfig["viewOutlinedDepth"] = checked; | ||
| 28 | } | ||
| 29 | } | ||
| 30 | CheckBox { | ||
| 31 | text: "Glow" | ||
| 32 | checked: root.drawConfig["glow"] | ||
| 33 | onCheckedChanged: { | ||
| 34 | root.drawConfig["glow"] = checked; | ||
| 35 | } | ||
| 36 | } | ||
| 37 | ConfigSlider { | ||
| 38 | label: "Width" | ||
| 39 | integral: false | ||
| 40 | config: root.drawConfig | ||
| 41 | property: "width" | ||
| 42 | max: 15.0 | ||
| 43 | min: 0.0 | ||
| 44 | width: 280 | ||
| 45 | } | ||
| 46 | ConfigSlider { | ||
| 47 | label: "Intensity" | ||
| 48 | integral: false | ||
| 49 | config: root.drawConfig | ||
| 50 | property: "intensity" | ||
| 51 | max: 1.0 | ||
| 52 | min: 0.0 | ||
| 53 | width: 280 | ||
| 54 | } | ||
| 55 | |||
| 56 | GroupBox { | ||
| 57 | title: "Color" | ||
| 58 | width: 280 | ||
| 59 | Column { | ||
| 60 | spacing: 8 | ||
| 61 | |||
| 62 | ConfigSlider { | ||
| 63 | label: "Red" | ||
| 64 | integral: false | ||
| 65 | config: root.drawConfig | ||
| 66 | property: "colorR" | ||
| 67 | max: 1.0 | ||
| 68 | min: 0.0 | ||
| 69 | width: 270 | ||
| 70 | } | ||
| 71 | ConfigSlider { | ||
| 72 | label: "Green" | ||
| 73 | integral: false | ||
| 74 | config: root.drawConfig | ||
| 75 | property: "colorG" | ||
| 76 | max: 1.0 | ||
| 77 | min: 0.0 | ||
| 78 | width: 270 | ||
| 79 | } | ||
| 80 | ConfigSlider { | ||
| 81 | label: "Blue" | ||
| 82 | integral: false | ||
| 83 | config: root.drawConfig | ||
| 84 | property: "colorB" | ||
| 85 | max: 1.0 | ||
| 86 | min: 0.0 | ||
| 87 | width: 270 | ||
| 88 | } | ||
| 89 | } | ||
| 90 | } | ||
| 91 | |||
| 92 | GroupBox { | ||
| 93 | title: "Fill Opacity" | ||
| 94 | width: 280 | ||
| 95 | Column { | ||
| 96 | spacing: 8 | ||
| 97 | |||
| 98 | ConfigSlider { | ||
| 99 | label: "Unoccluded" | ||
| 100 | integral: false | ||
| 101 | config: root.drawConfig | ||
| 102 | property: "fillOpacityUnoccluded" | ||
| 103 | max: 1.0 | ||
| 104 | min: 0.0 | ||
| 105 | width: 270 | ||
| 106 | } | ||
| 107 | ConfigSlider { | ||
| 108 | label: "Occluded" | ||
| 109 | integral: false | ||
| 110 | config: root.drawConfig | ||
| 111 | property: "fillOpacityOccluded" | ||
| 112 | max: 1.0 | ||
| 113 | min: 0.0 | ||
| 114 | width: 270 | ||
| 115 | } | ||
| 116 | } | ||
| 117 | } | ||
| 118 | } | ||
| 119 | } | ||