WIP - haze colour.

This commit is contained in:
Nissim Hadar 2017-10-05 12:13:37 -07:00
parent 512b469dc6
commit 395d9cbd6b
3 changed files with 11 additions and 12 deletions

View file

@ -190,7 +190,7 @@ public:
float getHazeRange() const { return _hazeRange; }
void setHazeBlendInColor(const xColor hazeBlendInColor) { _hazeBlendInColor = hazeBlendInColor; }
xColor getHazeBlendInColor() { return _hazeBlendInColor; }
void setHazeBlendOutColor(const xColor hazeBlendOutColor) { _hazeBlendInColor = hazeBlendOutColor; }
void setHazeBlendOutColor(const xColor hazeBlendOutColor) { _hazeBlendOutColor = hazeBlendOutColor; }
xColor getHazeBlendOutColor() const { return _hazeBlendOutColor; }
void setHazeLightBlendAngle(float hazeLightBlendAngle) { _hazeLightBlendAngle = hazeLightBlendAngle; }
float getHazeLightBlendAngle() const { return _hazeLightBlendAngle; }

View file

@ -560,11 +560,7 @@
<div class="tuple">
<div><label>Range <span class="unit">m</span></label><input type="number" id="property-zone-haze-range" min="5" max="10000" step="5"></div>
<div><label>Altitude <span class="unit">m</span></label><input type="number" id="property-zone-haze-altitude" min="10" max="5000" step="10"></div>
</div>
</fieldset>
<fieldset class="zone-group zone-section haze-section property gen fstuple">
<div class="tuple">
<div><label>BackgroundBlend </label><input type="number" id="property-zone-haze-background-blend" min="0.0" max="1.0" step="0.05"></div>
<div><label>Background Blend </label><input type="number" id="property-zone-haze-background-blend" min="0.0" max="1.0" step="0.01"></div>
</div>
</fieldset>
<fieldset class="zone-group zone-section haze-section property rgb fstuple">

View file

@ -1008,15 +1008,18 @@ function loaded() {
elZoneHazeMode.value = properties.hazeMode;
setDropdownText(elZoneHazeMode);
elZoneHazeRange.value = properties.haze.hazeRange.toFixed(2);
elZoneHazeBlendInColor.style.backgroundColor = "rgb(" + properties.haze.hazeBlendInColor.red + "," + properties.haze.hazeBlendInColor.green + "," + properties.haze.hazeBlendInColor.blue + ")";
elZoneHazeRange.value = properties.haze.hazeRange.toFixed(0);
elZoneHazeBlendInColor.style.backgroundColor = "rgb(" +
properties.haze.hazeBlendInColor.red + "," +
properties.haze.hazeBlendInColor.green + "," +
properties.haze.hazeBlendInColor.blue + ")";
elZoneHazeBlendInColorRed.value = properties.haze.hazeBlendInColor.red;
elZoneHazeBlendInColorGreen.value = properties.haze.hazeBlendInColor.green;
elZoneHazeBlendInColorBlue.value = properties.haze.hazeBlendInColor.blue;
elZoneHazeBackgroundBlend.value = properties.haze.hazeBackgroundBlend;
elZoneHazeBackgroundBlend.value = properties.haze.hazeBackgroundBlend.toFixed(2);
elZoneHazeAltitude.value = properties.haze.hazeAltitude.toFixed(2);
elZoneHazeAltitude.value = properties.haze.hazeAltitude.toFixed(0);
elZoneStageLatitude.value = properties.stage.latitude.toFixed(2);
elZoneStageLongitude.value = properties.stage.longitude.toFixed(2);
@ -1431,14 +1434,14 @@ function loaded() {
emitColorPropertyUpdate('color', rgb.r, rgb.g, rgb.b, 'hazeBlendIn');
}
}));
var zoneHazeBlendInColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('hazeBlendIn', 'color',
var zoneHazeBlendInColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('haze', 'hazeBlendInColor',
elZoneHazeBlendInColorRed,
elZoneHazeBlendInColorGreen,
elZoneHazeBlendInColorBlue);
elZoneHazeBlendInColorRed.addEventListener('change', zoneHazeBlendInColorChangeFunction);
elZoneHazeBlendInColorGreen.addEventListener('change', zoneHazeBlendInColorChangeFunction);
elZoneHazeBlendInColorBlue.addEventListener('change', zoneKeyHazeBlendInColorChangeFunction);
elZoneHazeBlendInColorBlue.addEventListener('change', zoneHazeBlendInColorChangeFunction);
elZoneHazeBackgroundBlend.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('haze', 'hazeBackgroundBlend'));
elZoneHazeAltitude.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('haze', 'hazeAltitude'));