(nullptr);
diff --git a/libraries/script-engine/src/ScriptEngine.cpp b/libraries/script-engine/src/ScriptEngine.cpp
index e679e9f6c5..57e9b06f9d 100644
--- a/libraries/script-engine/src/ScriptEngine.cpp
+++ b/libraries/script-engine/src/ScriptEngine.cpp
@@ -2210,7 +2210,7 @@ void ScriptEngine::loadEntityScript(const EntityItemID& entityID, const QString&
/**jsdoc
* Triggered when the script starts for a user. See also, {@link Script.entityScriptPreloadFinished}.
* Note: Can only be connected to via this.preload = function (...) { ... }
in the entity script.
- * Available in: | Client Entity Scripts | Server Entity Scripts |
---|
+ * Supported Script Types: Client Entity Scripts • Server Entity Scripts
* @function Entities.preload
* @param {Uuid} entityID - The ID of the entity that the script is running in.
* @returns {Signal}
@@ -2416,7 +2416,7 @@ void ScriptEngine::entityScriptContentAvailable(const EntityItemID& entityID, co
/**jsdoc
* Triggered when the script terminates for a user.
* Note: Can only be connected to via this.unoad = function () { ... }
in the entity script.
- * Available in: | Client Entity Scripts | Server Entity Scripts |
---|
+ * Supported Script Types: Client Entity Scripts • Server Entity Scripts
* @function Entities.unload
* @param {Uuid} entityID - The ID of the entity that the script is running in.
* @returns {Signal}
diff --git a/libraries/script-engine/src/ScriptEngine.h b/libraries/script-engine/src/ScriptEngine.h
index 7300f52f9b..3ffef16844 100644
--- a/libraries/script-engine/src/ScriptEngine.h
+++ b/libraries/script-engine/src/ScriptEngine.h
@@ -416,8 +416,10 @@ public:
* Provides access to methods or objects provided in an external JavaScript or JSON file.
* See {@link https://docs.highfidelity.com/script/js-tips.html} for further details.
* @function Script.require
- * @param {string} module - The module to use. May be a JavaScript file or the name of a system module such as
- * "sppUi"
.
+ * @param {string} module - The module to use. May be a JavaScript file, a JSON file, or the name of a system module such
+ * as "appUi"
(i.e., the "appUi.js" system module JavaScript file).
+ * @returns {object|array} The value assigned to module.exports
in the JavaScript file, or the value defined
+ * in the JSON file.
*/
Q_INVOKABLE QScriptValue require(const QString& moduleId);
@@ -842,7 +844,7 @@ signals:
/**jsdoc
* Triggered when the script starts for the user. See also, {@link Entities.preload}.
- * Available in: | Client Entity Scripts | Server Entity Scripts |
---|
+ * Supported Script Types: Client Entity Scripts • Server Entity Scripts
* @function Script.entityScriptPreloadFinished
* @param {Uuid} entityID - The ID of the entity that the script is running in.
* @returns {Signal}
diff --git a/plugins/openvr/src/ViveControllerManager.cpp b/plugins/openvr/src/ViveControllerManager.cpp
index c21a9ae4df..8aa7311de4 100644
--- a/plugins/openvr/src/ViveControllerManager.cpp
+++ b/plugins/openvr/src/ViveControllerManager.cpp
@@ -1319,13 +1319,13 @@ void ViveControllerManager::InputDevice::setConfigFromString(const QString& valu
* RX | number | number | Right stick x-axis scale. |
* RY | number | number | Right stick y-axis scale. |
* LS | number | number | Left touch pad pressed. |
- * LS_CENTER | number | number | Left touch pad center pressed. |
- * LS_X | number | number | Left touch pad pressed x-coordinate. |
- * LS_Y | number | number | Left touch pad pressed y-coordinate. |
+ * LSCenter | number | number | Left touch pad center pressed. |
+ * LSX | number | number | Left touch pad pressed x-coordinate. |
+ * LSY | number | number | Left touch pad pressed y-coordinate. |
* RS | number | number | Right touch pad pressed. |
- * RS_CENTER | number | number | Right touch pad center pressed. |
- * RS_X | number | number | Right touch pad pressed x-coordinate. |
- * RS_Y | number | number | Right touch pad pressed y-coordinate. |
+ * RSCenter | number | number | Right touch pad center pressed. |
+ * RSX | number | number | Right touch pad pressed x-coordinate. |
+ * RSY | number | number | Right touch pad pressed y-coordinate. |
* LSTouch | number | number | Left touch pad is touched. |
* RSTouch | number | number | Right touch pad is touched. |
* Triggers |
diff --git a/scripts/developer/utilities/render/bloom.qml b/scripts/developer/utilities/render/bloom.qml
deleted file mode 100644
index 705a9826d6..0000000000
--- a/scripts/developer/utilities/render/bloom.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-//
-// bloom.qml
-// developer/utilities/render
-//
-// Olivier Prat, created on 09/25/2017.
-// Copyright 2017 High Fidelity, Inc.
-//
-// Distributed under the Apache License, Version 2.0.
-// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
-//
-import QtQuick 2.5
-import QtQuick.Controls 1.4
-import "configSlider"
-
-Item {
- id: root
- property var configDebug: Render.getConfig("RenderMainView.DebugBloom")
-
- Column {
- spacing: 8
-
- GroupBox {
- title: "Debug"
- Row {
- ExclusiveGroup { id: debugGroup }
- RadioButton {
- text : "Off"
- checked : !root.configDebug["enabled"]
- onCheckedChanged: {
- if (checked) {
- root.configDebug["enabled"] = false
- }
- }
- exclusiveGroup : debugGroup
- }
- RadioButton {
- text : "Lvl 0"
- checked :root.configDebug["enabled"] && root.configDebug["mode"]==0
- onCheckedChanged: {
- if (checked) {
- root.configDebug["enabled"] = true
- root.configDebug["mode"] = 0
- }
- }
- exclusiveGroup : debugGroup
- }
- RadioButton {
- text : "Lvl 1"
- checked : root.configDebug["enabled"] && root.configDebug["mode"]==1
- onCheckedChanged: {
- if (checked) {
- root.configDebug["enabled"] = true
- root.configDebug["mode"] = 1
- }
- }
- exclusiveGroup : debugGroup
- }
- RadioButton {
- text : "Lvl 2"
- checked : root.configDebug["enabled"] && root.configDebug["mode"]==2
- onCheckedChanged: {
- if (checked) {
- root.configDebug["enabled"] = true
- root.configDebug["mode"] = 2
- }
- }
- exclusiveGroup : debugGroup
- }
- RadioButton {
- text : "All"
- checked : root.configDebug["enabled"] && root.configDebug["mode"]==3
- onCheckedChanged: {
- if (checked) {
- root.configDebug["enabled"] = true
- root.configDebug["mode"] = 3
- }
- }
- exclusiveGroup : debugGroup
- }
- }
- }
- }
-}
diff --git a/scripts/developer/utilities/render/debugBloom.js b/scripts/developer/utilities/render/debugBloom.js
index 39629ab0ce..3c5e722a18 100644
--- a/scripts/developer/utilities/render/debugBloom.js
+++ b/scripts/developer/utilities/render/debugBloom.js
@@ -10,11 +10,8 @@
//
// Set up the qml ui
-var qml = Script.resolvePath('bloom.qml');
-var window = new OverlayWindow({
- title: 'Bloom',
- source: qml,
- width: 285,
- height: 40,
-});
-window.closed.connect(function() { Script.stop(); });
\ No newline at end of file
+var window = Desktop.createWindow(Script.resolvePath('./luci/Bloom.qml'), {
+ title: "Bloom",
+ presentationMode: Desktop.PresentationMode.NATIVE,
+ size: {x: 285, y: 40}
+});
\ No newline at end of file
diff --git a/scripts/developer/utilities/render/deferredLighting.qml b/scripts/developer/utilities/render/deferredLighting.qml
deleted file mode 100644
index f2891ddc55..0000000000
--- a/scripts/developer/utilities/render/deferredLighting.qml
+++ /dev/null
@@ -1,103 +0,0 @@
-//
-// deferredLighting.qml
-//
-// Created by Sam Gateau on 6/6/2016
-// Copyright 2016 High Fidelity, Inc.
-//
-// Distributed under the Apache License, Version 2.0.
-// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
-//
-import QtQuick 2.7
-import QtQuick.Controls 1.4
-import QtQuick.Layouts 1.3
-
-import stylesUit 1.0
-import controlsUit 1.0 as HifiControls
-import "configSlider"
-import "luci"
-
-Rectangle {
- HifiConstants { id: hifi;}
- id: render;
- anchors.margins: hifi.dimensions.contentMargin.x
-
- color: hifi.colors.baseGray;
- property var mainViewTask: Render.getConfig("RenderMainView")
-
- Column {
- spacing: 5
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: hifi.dimensions.contentMargin.x
-
-
- HifiControls.Label {
- text: "Shading"
- }
- ShadingModel {}
-
- Separator {}
- ToneMapping {}
-
- Separator {}
- Column {
- anchors.left: parent.left
- anchors.right: parent.right
- spacing: 5
- Repeater {
- model: [ "MSAA:PreparePrimaryBufferForward:numSamples:4:1"
- ]
- ConfigSlider {
- label: qsTr(modelData.split(":")[0])
- integral: true
- config: render.mainViewTask.getConfig(modelData.split(":")[1])
- property: modelData.split(":")[2]
- max: modelData.split(":")[3]
- min: modelData.split(":")[4]
-
- anchors.left: parent.left
- anchors.right: parent.right
- }
- }
- }
- Separator {}
- Framebuffer {}
-
- Separator {}
- BoundingBoxes {
-
- }
- Separator {}
- Row {
- HifiControls.Button {
- text: "Engine"
- // activeFocusOnPress: false
- onClicked: {
- sendToScript({method: "openEngineView"});
- }
- }
- HifiControls.Button {
- text: "LOD"
- // activeFocusOnPress: false
- onClicked: {
- sendToScript({method: "openEngineLODView"});
- }
- }
- HifiControls.Button {
- text: "Cull"
- // activeFocusOnPress: false
- onClicked: {
- sendToScript({method: "openCullInspectorView"});
- }
- }
- }
- Row {
- HifiControls.Button {
- text: "Material"
- onClicked: {
- sendToScript({method: "openMaterialInspectorView"});
- }
- }
- }
- }
-}
diff --git a/scripts/developer/utilities/render/luci.js b/scripts/developer/utilities/render/luci.js
index fd84f55e65..e2e5523ccd 100644
--- a/scripts/developer/utilities/render/luci.js
+++ b/scripts/developer/utilities/render/luci.js
@@ -1,80 +1,84 @@
-"use strict";
-
-//
-// Luci.js
-// tablet-engine app
-//
-// Copyright 2017 High Fidelity, Inc.
-//
-// Distributed under the Apache License, Version 2.0.
-// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-//
+var MaterialInspector = Script.require('./materialInspector.js');
+var Page = Script.require('./luci/Page.js');
-(function() {
- var AppUi = Script.require('appUi');
-
- var MaterialInspector = Script.require('./materialInspector.js');
- var Page = Script.require('./luci/Page.js');
- var moveDebugCursor = false;
- var onMousePressEvent = function (e) {
- if (e.isMiddleButton) {
- moveDebugCursor = true;
- setDebugCursor(e.x, e.y);
- }
- };
- Controller.mousePressEvent.connect(onMousePressEvent);
-
- var onMouseReleaseEvent = function () {
- moveDebugCursor = false;
- };
- Controller.mouseReleaseEvent.connect(onMouseReleaseEvent);
-
- var onMouseMoveEvent = function (e) {
- if (moveDebugCursor) {
- setDebugCursor(e.x, e.y);
- }
- };
- Controller.mouseMoveEvent.connect(onMouseMoveEvent);
-
- function setDebugCursor(x, y) {
- var nx = 2.0 * (x / Window.innerWidth) - 1.0;
- var ny = 1.0 - 2.0 * ((y) / (Window.innerHeight));
-
- Render.getConfig("RenderMainView").getConfig("DebugDeferredBuffer").size = { x: nx, y: ny, z: 1.0, w: 1.0 };
- }
+function openView() {
+ //window.closed.connect(function() { Script.stop(); });
var pages = new Pages();
-
- pages.addPage('openEngineLODView', 'Render LOD', '../lod.qml', 300, 400);
- pages.addPage('openCullInspectorView', 'Cull Inspector', '../luci/Culling.qml', 300, 400);
- pages.addPage('openMaterialInspectorView', 'Material Inspector', '../materialInspector.qml', 300, 400, MaterialInspector.setWindow);
-
function fromQml(message) {
if (pages.open(message.method)) {
return;
}
}
- var ui;
- function startup() {
- ui = new AppUi({
- buttonName: "LUCI",
- home: Script.resolvePath("deferredLighting.qml"),
- additionalAppScreens : Script.resolvePath("engineInspector.qml"),
- onMessage: fromQml,
- normalButton: Script.resolvePath("../../../system/assets/images/luci-i.svg"),
- activeButton: Script.resolvePath("../../../system/assets/images/luci-a.svg")
- });
+ var luciWindow
+ function openLuciWindow(window) {
+ if (luciWindow !== undefined) {
+ activeWindow.fromQml.disconnect(fromQml);
+ }
+ if (window !== undefined) {
+ window.fromQml.connect(fromQml);
+ }
+ luciWindow = window;
+
+
+ var moveDebugCursor = false;
+ var onMousePressEvent = function (e) {
+ if (e.isMiddleButton) {
+ moveDebugCursor = true;
+ setDebugCursor(e.x, e.y);
+ }
+ };
+ Controller.mousePressEvent.connect(onMousePressEvent);
+
+ var onMouseReleaseEvent = function () {
+ moveDebugCursor = false;
+ };
+ Controller.mouseReleaseEvent.connect(onMouseReleaseEvent);
+
+ var onMouseMoveEvent = function (e) {
+ if (moveDebugCursor) {
+ setDebugCursor(e.x, e.y);
+ }
+ };
+ Controller.mouseMoveEvent.connect(onMouseMoveEvent);
+
+ function setDebugCursor(x, y) {
+ var nx = 2.0 * (x / Window.innerWidth) - 1.0;
+ var ny = 1.0 - 2.0 * ((y) / (Window.innerHeight));
+
+ Render.getConfig("RenderMainView").getConfig("DebugDeferredBuffer").size = { x: nx, y: ny, z: 1.0, w: 1.0 };
+ }
+
}
- startup();
- Script.scriptEnding.connect(function () {
+
+ function closeLuciWindow() {
+ if (luciWindow !== undefined) {
+ activeWindow.fromQml.disconnect(fromQml);
+ }
+ luciWindow = {};
+
Controller.mousePressEvent.disconnect(onMousePressEvent);
Controller.mouseReleaseEvent.disconnect(onMouseReleaseEvent);
Controller.mouseMoveEvent.disconnect(onMouseMoveEvent);
pages.clear();
- });
-}());
+ }
+
+ pages.addPage('Luci', 'Luci', '../luci.qml', 300, 420, openLuciWindow, closeLuciWindow);
+ pages.addPage('openEngineInspectorView', 'Render Engine Inspector', '../engineInspector.qml', 300, 400);
+ pages.addPage('openEngineLODView', 'Render LOD', '../lod.qml', 300, 400);
+ pages.addPage('openMaterialInspectorView', 'Material Inspector', '../materialInspector.qml', 300, 400, MaterialInspector.setWindow, MaterialInspector.setWindow);
+
+ pages.open('Luci');
+
+
+ return pages;
+}
+
+
+openView();
+
diff --git a/scripts/developer/utilities/render/luci.qml b/scripts/developer/utilities/render/luci.qml
index d768acb160..71962992b8 100644
--- a/scripts/developer/utilities/render/luci.qml
+++ b/scripts/developer/utilities/render/luci.qml
@@ -72,6 +72,12 @@ Rectangle {
Antialiasing {}
}
}
+ Prop.PropFolderPanel {
+ label: "Bloom"
+ panelFrameData: Component {
+ Bloom {}
+ }
+ }
Prop.PropFolderPanel {
label: "Culling"
panelFrameData: Component {
diff --git a/scripts/developer/utilities/render/luci/Antialiasing.qml b/scripts/developer/utilities/render/luci/Antialiasing.qml
index 6d1209157f..2a52dfed46 100644
--- a/scripts/developer/utilities/render/luci/Antialiasing.qml
+++ b/scripts/developer/utilities/render/luci/Antialiasing.qml
@@ -22,15 +22,12 @@ import "../../lib/prop" as Prop
Column{
- HifiConstants { id: hifi; }
+ id: antialiasing
- id: antialiasing
- padding: 10
anchors.left: parent.left
anchors.right: parent.right
- spacing: 10
- Prop.PropScalar {
+ Prop.PropScalar {
label: "MSAA"
object: Render.getConfig("RenderMainView.PreparePrimaryBufferForward")
property: "numSamples"
@@ -38,49 +35,44 @@ Column{
max: 32
integral: true
}
- Row {
- spacing: 10
- id: fxaaOnOff
- property bool debugFXAA: false
- HifiControls.Button {
- function getTheText() {
- if (Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff) {
- return "FXAA"
- } else {
- return "TAA"
- }
- }
- text: getTheText()
- onClicked: {
- var onOff = !Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff;
- if (onOff) {
- Render.getConfig("RenderMainView.JitterCam").none();
- Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff = true;
- } else {
- Render.getConfig("RenderMainView.JitterCam").play();
- Render.getConfig("RenderMainView.Antialiasing").fxaaOnOff = false;
- }
-
- }
- }
+
+ Prop.PropEnum {
+ label: "Deferred AA Method"
+ object: Render.getConfig("RenderMainView.Antialiasing")
+ property: "mode"
+ enums: [
+ "Off",
+ "TAA",
+ "FXAA",
+ ]
+ }
+ Prop.PropEnum {
+ id: jitter
+ label: "Jitter"
+ object: Render.getConfig("RenderMainView.JitterCam")
+ property: "state"
+ enums: [
+ "Off",
+ "On",
+ "Paused",
+ ]
}
Separator {}
+
+ Prop.PropScalar {
+ visible: (Render.getConfig("RenderMainView.JitterCam").state == 2)
+ label: "Sample Index"
+ object: Render.getConfig("RenderMainView.JitterCam")
+ property: "index"
+ // min: -1
+ // max: 32
+ readOnly: true
+ integral: true
+ }
Row {
+ visible: (Render.getConfig("RenderMainView.JitterCam").state == 2)
spacing: 10
-
- HifiControls.Button {
- text: {
- var state = 2 - (Render.getConfig("RenderMainView.JitterCam").freeze * 1 - Render.getConfig("RenderMainView.JitterCam").stop * 2);
- if (state === 2) {
- return "Jitter"
- } else if (state === 1) {
- return "Paused at " + Render.getConfig("RenderMainView.JitterCam").index + ""
- } else {
- return "No Jitter"
- }
- }
- onClicked: { Render.getConfig("RenderMainView.JitterCam").cycleStopPauseRun(); }
- }
+
HifiControls.Button {
text: "<"
onClicked: { Render.getConfig("RenderMainView.JitterCam").prev(); }
@@ -90,96 +82,75 @@ Column{
onClicked: { Render.getConfig("RenderMainView.JitterCam").next(); }
}
}
- Separator {}
- HifiControls.CheckBox {
- boxSize: 20
- text: "Constrain color"
- checked: Render.getConfig("RenderMainView.Antialiasing")["constrainColor"]
- onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["constrainColor"] = checked }
- }
- ConfigSlider {
- label: qsTr("Covariance gamma")
- integral: false
- config: Render.getConfig("RenderMainView.Antialiasing")
+ Separator {}
+ Prop.PropBool {
+ label: "Constrain color"
+ object: Render.getConfig("RenderMainView.Antialiasing")
+ property: "constrainColor"
+ }
+ Prop.PropScalar {
+ label: "Covariance gamma"
+ object: Render.getConfig("RenderMainView.Antialiasing")
property: "covarianceGamma"
max: 1.5
min: 0.5
- height: 38
- }
- Separator {}
- HifiControls.CheckBox {
- boxSize: 20
- text: "Feedback history color"
- checked: Render.getConfig("RenderMainView.Antialiasing")["feedbackColor"]
- onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["feedbackColor"] = checked }
- }
-
- ConfigSlider {
- label: qsTr("Source blend")
- integral: false
- config: Render.getConfig("RenderMainView.Antialiasing")
+ }
+ Separator {}
+ Prop.PropBool {
+ label: "Feedback history color"
+ object: Render.getConfig("RenderMainView.Antialiasing")
+ property: "feedbackColor"
+ }
+ Prop.PropScalar {
+ label: "Source blend"
+ object: Render.getConfig("RenderMainView.Antialiasing")
property: "blend"
max: 1.0
min: 0.0
- height: 38
}
-
- ConfigSlider {
- label: qsTr("Post sharpen")
- integral: false
- config: Render.getConfig("RenderMainView.Antialiasing")
+ Prop.PropScalar {
+ label: "Post sharpen"
+ object: Render.getConfig("RenderMainView.Antialiasing")
property: "sharpen"
max: 1.0
min: 0.0
}
- Separator {}
- Row {
-
- spacing: 10
- HifiControls.CheckBox {
- boxSize: 20
- text: "Debug"
- checked: Render.getConfig("RenderMainView.Antialiasing")["debug"]
- onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["debug"] = checked }
- }
- HifiControls.CheckBox {
- boxSize: 20
- text: "Show Debug Cursor"
- checked: Render.getConfig("RenderMainView.Antialiasing")["showCursorPixel"]
- onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["showCursorPixel"] = checked }
- }
- }
- ConfigSlider {
- label: qsTr("Debug Region <")
- integral: false
- config: Render.getConfig("RenderMainView.Antialiasing")
+ Separator {}
+ Prop.PropBool {
+ label: "Debug"
+ object: Render.getConfig("RenderMainView.Antialiasing")
+ property: "debug"
+ }
+ Prop.PropBool {
+ label: "Show Debug Cursor"
+ object: Render.getConfig("RenderMainView.Antialiasing")
+ property: "showCursorPixel"
+ }
+ Prop.PropScalar {
+ label: "Debug Region <"
+ object: Render.getConfig("RenderMainView.Antialiasing")
property: "debugX"
max: 1.0
min: 0.0
}
- HifiControls.CheckBox {
- boxSize: 20
- text: "Closest Fragment"
- checked: Render.getConfig("RenderMainView.Antialiasing")["showClosestFragment"]
- onCheckedChanged: { Render.getConfig("RenderMainView.Antialiasing")["showClosestFragment"] = checked }
- }
- ConfigSlider {
- label: qsTr("Debug Velocity Threshold [pix]")
- integral: false
- config: Render.getConfig("RenderMainView.Antialiasing")
+ Prop.PropBool {
+ label: "Closest Fragment"
+ object: Render.getConfig("RenderMainView.Antialiasing")
+ property: "showClosestFragment"
+ }
+ Prop.PropScalar {
+ label: "Debug Velocity Threshold [pix]"
+ object: Render.getConfig("RenderMainView.Antialiasing")
property: "debugShowVelocityThreshold"
max: 50
min: 0.0
- height: 38
}
- ConfigSlider {
- label: qsTr("Debug Orb Zoom")
- integral: false
- config: Render.getConfig("RenderMainView.Antialiasing")
+ Prop.PropScalar {
+ label: "Debug Orb Zoom"
+ object: Render.getConfig("RenderMainView.Antialiasing")
property: "debugOrbZoom"
max: 32.0
min: 1.0
- height: 38
- }
+ }
}
diff --git a/scripts/developer/utilities/render/luci/Bloom.qml b/scripts/developer/utilities/render/luci/Bloom.qml
new file mode 100644
index 0000000000..7db75d94ef
--- /dev/null
+++ b/scripts/developer/utilities/render/luci/Bloom.qml
@@ -0,0 +1,48 @@
+//
+// bloom.qml
+//
+// Olivier Prat, created on 09/25/2017.
+// Copyright 2017 High Fidelity, Inc.
+//
+// Distributed under the Apache License, Version 2.0.
+// See the accompanying file LICENSE or https://www.apache.org/licenses/LICENSE-2.0.html
+//
+import QtQuick 2.7
+import "../../lib/prop" as Prop
+
+Column {
+ anchors.left: parent.left
+ anchors.right: parent.right
+
+ id: bloom
+
+ property var config: Render.getConfig("RenderMainView.DebugBloom")
+
+ Prop.PropBool {
+ label: "Apply Bloom"
+ object: Render.getConfig("RenderMainView.LightingModel")
+ property: "enableBloom"
+ }
+
+ function setDebugMode(mode) {
+ console.log("Bloom mode is " + mode)
+ bloom.config.enabled = (mode != 0);
+ bloom.config.mode = mode;
+ }
+
+ Prop.PropEnum {
+ label: "Debug Bloom Buffer"
+ // object: config
+ // property: "mode"
+ enums: [
+ "Off",
+ "Lvl 0",
+ "Lvl 1",
+ "Lvl 2",
+ "All",
+ ]
+
+ valueVarSetter: function (mode) { bloom.setDebugMode(mode) }
+ }
+}
+
diff --git a/scripts/developer/utilities/render/luci/BoundingBoxes.qml b/scripts/developer/utilities/render/luci/BoundingBoxes.qml
index 636267729c..6b34e41b4c 100644
--- a/scripts/developer/utilities/render/luci/BoundingBoxes.qml
+++ b/scripts/developer/utilities/render/luci/BoundingBoxes.qml
@@ -54,7 +54,7 @@ Column {
Prop.PropCheckBox {
text: "Zones"
checked: root.mainViewTask.getConfig("DrawZones")["enabled"]
- onCheckedChanged: { root.mainViewTask.getConfig("ZoneRenderer")["enabled"] = checked; root.mainViewTask.getConfig("DrawZones")["enabled"] = checked; }
+ onCheckedChanged: { root.mainViewTask.getConfig("DrawZones")["enabled"] = checked; }
}
}
Column {
diff --git a/scripts/developer/utilities/render/luci/ShadingModel.qml b/scripts/developer/utilities/render/luci/ShadingModel.qml
index 78ca7f1740..afeca5a204 100644
--- a/scripts/developer/utilities/render/luci/ShadingModel.qml
+++ b/scripts/developer/utilities/render/luci/ShadingModel.qml
@@ -35,7 +35,8 @@ Column {
"Emissive:LightingModel:enableEmissive",
"Lightmap:LightingModel:enableLightmap",
"Background:LightingModel:enableBackground",
- "Haze:LightingModel:enableHaze",
+ "Haze:LightingModel:enableHaze",
+ "Bloom:LightingModel:enableBloom",
"AO:LightingModel:enableAmbientOcclusion",
"Textures:LightingModel:enableMaterialTexturing"
]
diff --git a/scripts/developer/utilities/render/luci/qmldir b/scripts/developer/utilities/render/luci/qmldir
index 3ebd9fcd8d..a4059ffcab 100644
--- a/scripts/developer/utilities/render/luci/qmldir
+++ b/scripts/developer/utilities/render/luci/qmldir
@@ -5,6 +5,7 @@ BoundingBoxes 1.0 BoundingBoxes.qml
Framebuffer 1.0 Framebuffer.qml
Antialiasing 1.0 Antialiasing.qml
Culling 1.0 Culling.qml
+Bloom 1.0 Bloom.qml
Platform 1.0 Platform.qml
RenderSettings 1.0 RenderSettings.qml
diff --git a/scripts/developer/utilities/render/luci2.js b/scripts/developer/utilities/render/luci2.js
deleted file mode 100644
index e2e5523ccd..0000000000
--- a/scripts/developer/utilities/render/luci2.js
+++ /dev/null
@@ -1,84 +0,0 @@
-
-
-var MaterialInspector = Script.require('./materialInspector.js');
-var Page = Script.require('./luci/Page.js');
-
-
-function openView() {
- //window.closed.connect(function() { Script.stop(); });
-
-
- var pages = new Pages();
- function fromQml(message) {
- if (pages.open(message.method)) {
- return;
- }
- }
-
- var luciWindow
- function openLuciWindow(window) {
- if (luciWindow !== undefined) {
- activeWindow.fromQml.disconnect(fromQml);
- }
- if (window !== undefined) {
- window.fromQml.connect(fromQml);
- }
- luciWindow = window;
-
-
- var moveDebugCursor = false;
- var onMousePressEvent = function (e) {
- if (e.isMiddleButton) {
- moveDebugCursor = true;
- setDebugCursor(e.x, e.y);
- }
- };
- Controller.mousePressEvent.connect(onMousePressEvent);
-
- var onMouseReleaseEvent = function () {
- moveDebugCursor = false;
- };
- Controller.mouseReleaseEvent.connect(onMouseReleaseEvent);
-
- var onMouseMoveEvent = function (e) {
- if (moveDebugCursor) {
- setDebugCursor(e.x, e.y);
- }
- };
- Controller.mouseMoveEvent.connect(onMouseMoveEvent);
-
- function setDebugCursor(x, y) {
- var nx = 2.0 * (x / Window.innerWidth) - 1.0;
- var ny = 1.0 - 2.0 * ((y) / (Window.innerHeight));
-
- Render.getConfig("RenderMainView").getConfig("DebugDeferredBuffer").size = { x: nx, y: ny, z: 1.0, w: 1.0 };
- }
-
- }
-
- function closeLuciWindow() {
- if (luciWindow !== undefined) {
- activeWindow.fromQml.disconnect(fromQml);
- }
- luciWindow = {};
-
- Controller.mousePressEvent.disconnect(onMousePressEvent);
- Controller.mouseReleaseEvent.disconnect(onMouseReleaseEvent);
- Controller.mouseMoveEvent.disconnect(onMouseMoveEvent);
- pages.clear();
- }
-
- pages.addPage('Luci', 'Luci', '../luci.qml', 300, 420, openLuciWindow, closeLuciWindow);
- pages.addPage('openEngineInspectorView', 'Render Engine Inspector', '../engineInspector.qml', 300, 400);
- pages.addPage('openEngineLODView', 'Render LOD', '../lod.qml', 300, 400);
- pages.addPage('openMaterialInspectorView', 'Material Inspector', '../materialInspector.qml', 300, 400, MaterialInspector.setWindow, MaterialInspector.setWindow);
-
- pages.open('Luci');
-
-
- return pages;
-}
-
-
-openView();
-
diff --git a/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js b/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js
index d3ec9da32d..a0fe6cf811 100644
--- a/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js
+++ b/scripts/simplifiedUI/simplifiedEmote/emojiApp/simplifiedEmoji.js
@@ -388,7 +388,8 @@ function playPopAnimation() {
var emojiCodeMap;
var customEmojiCodeMap;
var signalsConnected = false;
-function init() {
+var _this;
+function startup() {
// make a map of just the utf codes to help with accesing
emojiCodeMap = emojiList.reduce(function (codeMap, currentEmojiInList, index) {
if (
@@ -414,55 +415,30 @@ function init() {
pruneOldAvimojis();
+ Script.scriptEnding.connect(unload);
Window.domainChanged.connect(onDomainChanged);
MyAvatar.scaleChanged.connect(onScaleChanged);
- Script.scriptEnding.connect(scriptEnding);
signalsConnected = true;
-}
-
-// #endregion
-// *************************************
-// END main
-// *************************************
-
-// *************************************
-// START cleanup
-// *************************************
-// #region cleanup
-
-
-function scriptEnding() {
- resetEmojis();
- if (signalsConnected) {
- Script.scriptEnding.disconnect(scriptEnding);
- Window.domainChanged.disconnect(onDomainChanged);
- MyAvatar.scaleChanged.disconnect(onScaleChanged);
- signalsConnected = false;
+ function AviMoji() {
+ _this = this;
+ this._avimojiQMLWindow = null;
}
+
+ AviMoji.prototype = {
+ addEmoji: addEmojiFromQML,
+ registerAvimojiQMLWindow: registerAvimojiQMLWindow
+ };
+
+ return new AviMoji();
}
-// #endregion
-// *************************************
-// END cleanup
-// *************************************
-
-// *************************************
-// START API
-// *************************************
-// #region API
-
-var _this;
-function AviMoji() {
- _this = this;
- this._avimojiQMLWindow;
-}
-
function registerAvimojiQMLWindow(avimojiQMLWindow) {
this._avimojiQMLWindow = avimojiQMLWindow;
}
+
function addEmojiFromQML(code) {
var emojiObject = emojiList[emojiCodeMap[code]];
var emojiFilename;
@@ -475,25 +451,17 @@ function addEmojiFromQML(code) {
handleSelectedEmoji(emojiFilename);
}
+
function unload() {
- scriptEnding();
+ resetEmojis();
+ if (signalsConnected) {
+ Window.domainChanged.disconnect(onDomainChanged);
+ MyAvatar.scaleChanged.disconnect(onScaleChanged);
+ signalsConnected = false;
+ }
}
-function startup() {
- init();
-}
-AviMoji.prototype = {
- startup: startup,
- addEmoji: addEmojiFromQML,
- unload: unload,
- registerAvimojiQMLWindow: registerAvimojiQMLWindow
-};
+var aviMoji = startup();
-
-module.exports = AviMoji;
-
-// #endregion
-// *************************************
-// END API
-// *************************************
\ No newline at end of file
+module.exports = aviMoji;
\ No newline at end of file
diff --git a/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js b/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js
index cd6c80dd64..abf0dd73e8 100644
--- a/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js
+++ b/scripts/simplifiedUI/simplifiedEmote/simplifiedEmote.js
@@ -38,7 +38,6 @@ var customEmojiList = Script.require("./emojiApp/resources/modules/customEmojiLi
// #region EMOTE_UTILITY
-
function updateEmoteAppBarPosition() {
if (!emoteAppBarWindow) {
return;
@@ -425,7 +424,7 @@ function onGeometryChanged(rect) {
function onWindowMinimizedChanged(isMinimized) {
if (isMinimized) {
handleEmoteIndicatorVisibleChanged(false);
- } else if (!HMD.active && Settings.getValue("simplifiedUI/emoteIndicatorVisible", true)) {
+ } else if (!HMD.active) {
handleEmoteIndicatorVisibleChanged(true);
}
}
@@ -520,8 +519,8 @@ function showEmoteAppBar() {
}
-function handleEmoteIndicatorVisibleChanged(newValue) {
- if (newValue && !emoteAppBarWindow) {
+function handleEmoteIndicatorVisibleChanged(shouldBeVisible) {
+ if (shouldBeVisible && !emoteAppBarWindow) {
showEmoteAppBar();
} else if (emoteAppBarWindow) {
emoteAppBarWindow.fromQml.disconnect(onMessageFromEmoteAppBar);
@@ -531,13 +530,6 @@ function handleEmoteIndicatorVisibleChanged(newValue) {
}
-function onSettingsValueChanged(settingName, newValue) {
- if (settingName === "simplifiedUI/emoteIndicatorVisible") {
- handleEmoteIndicatorVisibleChanged(newValue);
- }
-}
-
-
function onDisplayModeChanged(isHMDMode) {
reactionsBegun.forEach(function(react) {
endReactionWrapper(react);
@@ -545,18 +537,17 @@ function onDisplayModeChanged(isHMDMode) {
if (isHMDMode) {
handleEmoteIndicatorVisibleChanged(false);
- } else if (Settings.getValue("simplifiedUI/emoteIndicatorVisible", true)) {
+ } else {
handleEmoteIndicatorVisibleChanged(true);
}
}
-var EmojiAPI = Script.require("./emojiApp/simplifiedEmoji.js");
-var emojiAPI = new EmojiAPI();
+var emojiAPI = Script.require("./emojiApp/simplifiedEmoji.js");
var keyPressSignalsConnected = false;
var emojiCodeMap;
var customEmojiCodeMap;
-function init() {
+function setup() {
deleteOldReticles();
// make a map of just the utf codes to help with accesing
@@ -584,22 +575,19 @@ function init() {
Window.minimizedChanged.connect(onWindowMinimizedChanged);
Window.geometryChanged.connect(onGeometryChanged);
- Settings.valueChanged.connect(onSettingsValueChanged);
HMD.displayModeChanged.connect(onDisplayModeChanged);
- emojiAPI.startup();
getSounds();
- handleEmoteIndicatorVisibleChanged(Settings.getValue("simplifiedUI/emoteIndicatorVisible", true));
+ handleEmoteIndicatorVisibleChanged(true);
Controller.keyPressEvent.connect(keyPressHandler);
Controller.keyReleaseEvent.connect(keyReleaseHandler);
keyPressSignalsConnected = true;
-
- Script.scriptEnding.connect(shutdown);
+ Script.scriptEnding.connect(unload);
}
-function shutdown() {
+function unload() {
if (emoteAppBarWindow) {
emoteAppBarWindow.fromQml.disconnect(onMessageFromEmoteAppBar);
emoteAppBarWindow.close();
@@ -614,14 +602,12 @@ function shutdown() {
endReactionWrapper(react);
});
- emojiAPI.unload();
maybeClearClapSoundInterval();
maybeClearReticleUpdateLimiterTimeout();
maybeDeleteRemoteIndicatorTimeout();
Window.minimizedChanged.disconnect(onWindowMinimizedChanged);
Window.geometryChanged.disconnect(onGeometryChanged);
- Settings.valueChanged.disconnect(onSettingsValueChanged);
HMD.displayModeChanged.disconnect(onDisplayModeChanged);
if (keyPressSignalsConnected) {
@@ -768,37 +754,4 @@ function toggleEmojiApp() {
// END EMOJI
// *************************************
-// *************************************
-// START API
-// *************************************
-// #region API
-
-
-function startup() {
- init();
-}
-
-
-function unload() {
- shutdown();
-}
-
-var _this;
-function EmoteBar() {
- _this = this;
-}
-
-
-EmoteBar.prototype = {
- startup: startup,
- unload: unload
-};
-
-module.exports = EmoteBar;
-
-
-// #endregion
-// *************************************
-// END API
-// *************************************
-
+setup();
\ No newline at end of file
diff --git a/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml b/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml
index a401feec12..787ccadd62 100644
--- a/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml
+++ b/scripts/simplifiedUI/simplifiedEmote/ui/qml/SimplifiedEmoteIndicator.qml
@@ -21,20 +21,24 @@ Rectangle {
id: root
color: simplifiedUI.colors.white
anchors.fill: parent
-
property int originalWidth: 48
property int expandedWidth: mainEmojiContainer.width + drawerContainer.width
// For the below to work, the Repeater's Item's second child must be the individual button's `MouseArea`
- property int requestedWidth: (drawerContainer.keepDrawerExpanded ||
- emoteIndicatorMouseArea.containsMouse ||
- emoteButtonsRepeater.itemAt(0).hovered ||
- emoteButtonsRepeater.itemAt(1).hovered ||
- emoteButtonsRepeater.itemAt(2).hovered ||
- emoteButtonsRepeater.itemAt(3).hovered ||
- emoteButtonsRepeater.itemAt(4).hovered ||
- emoteButtonsRepeater.itemAt(5).hovered) ? expandedWidth : originalWidth;
+ property int requestedWidth: (
+ root.allowEmoteDrawerExpansion && (
+ drawerContainer.keepDrawerExpanded ||
+ emoteIndicatorMouseArea.containsMouse ||
+ emoteButtonsRepeater.itemAt(0).hovered ||
+ emoteButtonsRepeater.itemAt(1).hovered ||
+ emoteButtonsRepeater.itemAt(2).hovered ||
+ emoteButtonsRepeater.itemAt(3).hovered ||
+ emoteButtonsRepeater.itemAt(4).hovered ||
+ emoteButtonsRepeater.itemAt(5).hovered)
+ ) ? expandedWidth : originalWidth;
readonly property int totalEmojiDurationMS: 7000 // Must match `TOTAL_EMOJI_DURATION_MS` in `simplifiedEmoji.js`
readonly property string emoteIconSource: "images/emote_Icon.svg"
+ property bool allowEmoteDrawerExpansion: Settings.getValue("simplifiedUI/allowEmoteDrawerExpansion", true)
+
onRequestedWidthChanged: {
root.requestNewWidth(root.requestedWidth);
@@ -45,6 +49,16 @@ Rectangle {
SmoothedAnimation { duration: 220 }
}
+ Connections {
+ target: Settings
+
+ onValueChanged: {
+ if (setting === "simplifiedUI/allowEmoteDrawerExpansion") {
+ root.allowEmoteDrawerExpansion = value;
+ }
+ }
+ }
+
SimplifiedConstants.SimplifiedConstants {
id: simplifiedUI
}
@@ -158,7 +172,7 @@ Rectangle {
anchors.fill: lockIcon
source: lockIcon
color: "#ffffff"
- visible: drawerContainer.keepDrawerExpanded
+ visible: root.allowEmoteDrawerExpansion && drawerContainer.keepDrawerExpanded
}
MouseArea {
diff --git a/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js b/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js
index beea979170..15ce8a83f6 100644
--- a/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js
+++ b/scripts/simplifiedUI/ui/simplifiedNametag/simplifiedNametag.js
@@ -47,15 +47,24 @@ function onAvatarAdded(uuid) {
}
-// Called on init
+// Create a new nametag list manager, connect signals, and return back a new Nametag object.
var avatarNametagMode;
function startup() {
nameTagListManager.create();
handleAvatarNametagMode(Settings.getValue("simplifiedNametag/avatarNametagMode", "on"));
+ Script.scriptEnding.connect(unload);
Window.domainChanged.connect(onDomainChange);
AvatarManager.avatarRemovedEvent.connect(onAvatarRemoved);
AvatarManager.avatarAddedEvent.connect(onAvatarAdded);
+
+ function NameTag() {}
+
+ NameTag.prototype = {
+ handleAvatarNametagMode: handleAvatarNametagMode
+ };
+
+ return new NameTag();
}
@@ -77,23 +86,7 @@ function handleAvatarNametagMode(newAvatarNameTagMode) {
}
-// *************************************
-// START api
-// *************************************
-// #region api
+var nameTag = startup();
-function NameTag() {}
+module.exports = nameTag;
-NameTag.prototype = {
- startup: startup,
- unload: unload,
- handleAvatarNametagMode: handleAvatarNametagMode
-};
-
-module.exports = NameTag;
-
-
-// #endregion
-// *************************************
-// END api
-// *************************************
\ No newline at end of file
diff --git a/scripts/simplifiedUI/ui/simplifiedStatusIndicator/simplifiedStatusIndicator.js b/scripts/simplifiedUI/ui/simplifiedStatusIndicator/simplifiedStatusIndicator.js
index 2b401c5bc5..4d06ecc99b 100644
--- a/scripts/simplifiedUI/ui/simplifiedStatusIndicator/simplifiedStatusIndicator.js
+++ b/scripts/simplifiedUI/ui/simplifiedStatusIndicator/simplifiedStatusIndicator.js
@@ -8,7 +8,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
-function simplifiedStatusIndicator(properties) {
+function SimplifiedStatusIndicator() {
var that = this;
var DEBUG = false;
@@ -86,6 +86,7 @@ function simplifiedStatusIndicator(properties) {
});
}
+
// Get status from database
function getStatus(callback) {
var queryParamString = "type=getStatus";
@@ -125,6 +126,17 @@ function simplifiedStatusIndicator(properties) {
// #region SIGNALS
+ function updateProperties(properties) {
+ // Overwrite with the given properties
+ var overwriteableKeys = ["statusChanged"];
+ Object.keys(properties).forEach(function (key) {
+ if (overwriteableKeys.indexOf(key) > -1) {
+ that[key] = properties[key];
+ }
+ });
+ }
+
+
var currentStatus = "available"; // Default is available
function toggleStatus() {
if (currentStatus === "busy") {
@@ -207,6 +219,8 @@ function simplifiedStatusIndicator(properties) {
Window.domainChanged.connect(onDomainChanged);
getStatus(setStatus);
+
+ Script.scriptEnding.connect(unload);
}
@@ -224,20 +238,15 @@ function simplifiedStatusIndicator(properties) {
// #endregion APP LIFETIME
- that.startup = startup;
- that.unload = unload;
that.toggleStatus = toggleStatus;
that.setStatus = setStatus;
that.getLocalStatus = getLocalStatus;
that.statusChanged = statusChanged;
-
- // Overwrite with the given properties
- var overwriteableKeys = ["statusChanged"];
- Object.keys(properties).forEach(function (key) {
- if (overwriteableKeys.indexOf(key) > -1) {
- that[key] = properties[key];
- }
- });
+ that.updateProperties = updateProperties;
+
+ startup();
}
+var simplifiedStatusIndicator = new SimplifiedStatusIndicator();
+
module.exports = simplifiedStatusIndicator;
\ No newline at end of file
diff --git a/scripts/simplifiedUI/ui/simplifiedUI.js b/scripts/simplifiedUI/ui/simplifiedUI.js
index 803c6627c0..c388c594c9 100644
--- a/scripts/simplifiedUI/ui/simplifiedUI.js
+++ b/scripts/simplifiedUI/ui/simplifiedUI.js
@@ -583,12 +583,9 @@ function restoreLODSettings() {
}
-var SimplifiedNametag = Script.require("./simplifiedNametag/simplifiedNametag.js?" + Date.now());
-var SimplifiedStatusIndicator = Script.require("./simplifiedStatusIndicator/simplifiedStatusIndicator.js?" + Date.now());
-var SimplifiedEmote = Script.require("../simplifiedEmote/simplifiedEmote.js?" + Date.now());
-var si;
-var nametag;
-var emote;
+var nametag = Script.require("./simplifiedNametag/simplifiedNametag.js?" + Date.now());
+var si = Script.require("./simplifiedStatusIndicator/simplifiedStatusIndicator.js?" + Date.now())
+var emote = Script.require("../simplifiedEmote/simplifiedEmote.js?" + Date.now());
var oldShowAudioTools;
var oldShowBubbleTools;
var keepExistingUIAndScriptsSetting = Settings.getValue("simplifiedUI/keepExistingUIAndScripts", false);
@@ -607,16 +604,8 @@ function startup() {
loadSimplifiedTopBar();
- si = new SimplifiedStatusIndicator({
- statusChanged: onStatusChanged
- });
- si.startup();
- nametag = new SimplifiedNametag();
- nametag.startup();
-
- emote = new SimplifiedEmote();
- emote.startup();
+ si.updateProperties({ statusChanged: onStatusChanged });
updateInputDeviceMutedOverlay(Audio.muted);
updateOutputDeviceMutedOverlay(isOutputMuted());
@@ -665,10 +654,6 @@ function shutdown() {
maybeDeleteInputDeviceMutedOverlay();
maybeDeleteOutputDeviceMutedOverlay();
- nametag.unload();
- si.unload();
- emote.unload();
-
Audio.mutedDesktopChanged.disconnect(onDesktopInputDeviceMutedChanged);
Audio.mutedHMDChanged.disconnect(onHMDInputDeviceMutedChanged);
Window.geometryChanged.disconnect(onGeometryChanged);