From 94765f0c531326e8de4ef4242285ca2df39fca40 Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 11 May 2015 15:54:14 +0200 Subject: [PATCH 1/2] Add print type --- examples/edit.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/examples/edit.js b/examples/edit.js index 585b45f3f9..64050d92aa 100644 --- a/examples/edit.js +++ b/examples/edit.js @@ -1197,7 +1197,11 @@ PropertiesTool = function(opts) { webView.eventBridge.webEventReceived.connect(function(data) { data = JSON.parse(data); - if (data.type == "update") { + if (data.type == "print") { + if (data.message) { + print(data.message); + } + } else if (data.type == "update") { selectionManager.saveProperties(); if (selectionManager.selections.length > 1) { properties = { From beba293d9683c9a277b5d4c74149892df1f0e03b Mon Sep 17 00:00:00 2001 From: Atlante45 Date: Mon, 11 May 2015 15:54:30 +0200 Subject: [PATCH 2/2] Hide Skybox/Atmosphere prps when not needed --- examples/html/entityProperties.html | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/examples/html/entityProperties.html b/examples/html/entityProperties.html index 26bcc63f15..561f39edd2 100644 --- a/examples/html/entityProperties.html +++ b/examples/html/entityProperties.html @@ -18,6 +18,12 @@ els[i].setAttribute('disabled', 'disabled'); } } + + function showElements(els, show) { + for (var i = 0; i < els.length; i++) { + els[i].style.display = (show) ? 'block' : 'none'; + } + } function createEmitCheckedPropertyUpdateFunction(propertyName) { return function() { @@ -504,6 +510,8 @@ elZoneAtmosphereScatteringWavelengthsZ.value = properties.atmosphere.scatteringWavelengths.z; elZoneAtmosphereHasStars.checked = properties.atmosphere.hasStars; + showElements(document.getElementsByClassName('skybox-section'), elZoneBackgroundMode.value == 'skybox'); + showElements(document.getElementsByClassName('atmosphere-section'), elZoneBackgroundMode.value == 'atmosphere'); } if (selected) { @@ -1117,7 +1125,7 @@ -
+
Skybox Color
R
@@ -1125,13 +1133,13 @@
B
-
+
Skybox URL
-
+
Atmosphere Center
X
@@ -1139,31 +1147,31 @@
Z
-
+
Atmosphere Inner Radius
-
+
Atmosphere Outer Radius
-
+
Atmosphere Mie Scattering
-
+
Atmosphere Rayleigh Scattering
-
+
Atmosphere Scattering Wavelenghts
X
@@ -1171,7 +1179,7 @@
Z
-
+