From c76229934cfbd4d8430ab72b790fcf49c5ff9dcc Mon Sep 17 00:00:00 2001 From: Nissim Hadar Date: Fri, 13 Oct 2017 12:21:00 -0700 Subject: [PATCH] Changed blend-in colour and blend-out colour to colour and glare colour --- .../src/RenderableZoneEntityItem.cpp | 8 +- .../entities/src/EntityItemProperties.cpp | 4 +- libraries/entities/src/EntityPropertyFlags.h | 4 +- libraries/entities/src/HazePropertyGroup.cpp | 68 ++++++++--------- libraries/entities/src/HazePropertyGroup.h | 8 +- libraries/entities/src/ZoneEntityItem.cpp | 16 ++-- libraries/entities/src/ZoneEntityItem.h | 12 +-- libraries/model/src/model/Stage.h | 12 +-- .../src/SceneScriptingInterface.cpp | 16 ++-- .../src/SceneScriptingInterface.h | 12 +-- scripts/system/html/js/entityProperties.js | 76 +++++++++---------- 11 files changed, 118 insertions(+), 118 deletions(-) diff --git a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp index a3951daa41..864b95ba63 100644 --- a/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp +++ b/libraries/entities-renderer/src/RenderableZoneEntityItem.cpp @@ -341,10 +341,10 @@ void ZoneEntityRenderer::updateHazeFromEntity(const TypedEntityPointer& entity) haze->setAltitudeBased(_hazeProperties.getHazeAltitudeEffect()); haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeRange())); - xColor hazeBlendInColor = _hazeProperties.getHazeBlendInColor(); - haze->setHazeColor(glm::vec3(hazeBlendInColor.red / 255.0, hazeBlendInColor.green / 255.0, hazeBlendInColor.blue / 255.0)); - xColor hazeBlendOutColor = _hazeProperties.getHazeBlendOutColor(); - haze->setDirectionalLightColor(glm::vec3(hazeBlendOutColor.red / 255.0, hazeBlendOutColor.green / 255.0, hazeBlendOutColor.blue / 255.0)); + xColor hazeColor = _hazeProperties.getHazeColor(); + haze->setHazeColor(glm::vec3(hazeColor.red / 255.0, hazeColor.green / 255.0, hazeColor.blue / 255.0)); + xColor hazeGlareColor = _hazeProperties.getHazeGlareColor(); + haze->setDirectionalLightColor(glm::vec3(hazeGlareColor.red / 255.0, hazeGlareColor.green / 255.0, hazeGlareColor.blue / 255.0)); haze->setHazeEnableLightBlend(_hazeProperties.getHazeEnableLightBlend()); haze->setDirectionalLightBlend(model::convertDirectionalLightAngleToPower(_hazeProperties.getHazeLightBlendAngle())); diff --git a/libraries/entities/src/EntityItemProperties.cpp b/libraries/entities/src/EntityItemProperties.cpp index 1c6782ba73..7098d0a79d 100644 --- a/libraries/entities/src/EntityItemProperties.cpp +++ b/libraries/entities/src/EntityItemProperties.cpp @@ -1156,8 +1156,8 @@ void EntityItemProperties::entityPropertyFlagsFromScriptValue(const QScriptValue ADD_PROPERTY_TO_MAP(PROP_HAZE_MODE, HazeMode, hazeMode, uint32_t); ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_RANGE, Haze, haze, HazeRange, hazeRange); - ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_BLEND_IN_COLOR, Haze, haze, HazeBlendInColor, hazeBlendInColor); - ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_BLEND_OUT_COLOR, Haze, haze, HazeBlendOutColor, hazeBlendOutColor); + ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_COLOR, Haze, haze, HazeColor, hazeColor); + ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_GLARE_COLOR, Haze, haze, HazeGlareColor, hazeGlareColor); ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_ENABLE_LIGHT_BLEND, Haze, haze, HazeEnableLightBlend, hazeEnableLightBlend); ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_LIGHT_BLEND_ANGLE, Haze, haze, HazeLightBlendAngle, hazeLightBlendAngle); diff --git a/libraries/entities/src/EntityPropertyFlags.h b/libraries/entities/src/EntityPropertyFlags.h index a1ffe6038f..4496ba34cb 100644 --- a/libraries/entities/src/EntityPropertyFlags.h +++ b/libraries/entities/src/EntityPropertyFlags.h @@ -235,8 +235,8 @@ enum EntityPropertyList { PROP_HAZE_MODE = PROP_COLOR, PROP_HAZE_RANGE = PROP_INTENSITY, - PROP_HAZE_BLEND_IN_COLOR = PROP_CUTOFF, - PROP_HAZE_BLEND_OUT_COLOR = PROP_EXPONENT, + PROP_HAZE_COLOR = PROP_CUTOFF, + PROP_HAZE_GLARE_COLOR = PROP_EXPONENT, PROP_HAZE_ENABLE_LIGHT_BLEND = PROP_IS_SPOTLIGHT, PROP_HAZE_LIGHT_BLEND_ANGLE = PROP_DIFFUSE_COLOR, diff --git a/libraries/entities/src/HazePropertyGroup.cpp b/libraries/entities/src/HazePropertyGroup.cpp index 5fd7b1e4c1..62e6fd7e84 100644 --- a/libraries/entities/src/HazePropertyGroup.cpp +++ b/libraries/entities/src/HazePropertyGroup.cpp @@ -16,8 +16,8 @@ #include "EntityItemPropertiesMacros.h" const float HazePropertyGroup::DEFAULT_HAZE_RANGE{ 1000.0f }; -const xColor HazePropertyGroup::DEFAULT_HAZE_BLEND_IN_COLOR{ 128, 154, 179 }; // Bluish -const xColor HazePropertyGroup::DEFAULT_HAZE_BLEND_OUT_COLOR{ 255, 229, 179 }; // Yellowish +const xColor HazePropertyGroup::DEFAULT_HAZE_COLOR{ 128, 154, 179 }; // Bluish +const xColor HazePropertyGroup::DEFAULT_HAZE_GLARE_COLOR{ 255, 229, 179 }; // Yellowish const float HazePropertyGroup::DEFAULT_HAZE_LIGHT_BLEND_ANGLE{ 20.0 }; const float HazePropertyGroup::DEFAULT_HAZE_CEILING{ 200.0f }; @@ -30,8 +30,8 @@ const float HazePropertyGroup::DEFAULT_HAZE_KEYLIGHT_ALTITUDE{ 200.0f }; void HazePropertyGroup::copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties, QScriptEngine* engine, bool skipDefaults, EntityItemProperties& defaultEntityProperties) const { COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_RANGE, Haze, haze, HazeRange, hazeRange); - COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_BLEND_IN_COLOR, Haze, haze, HazeBlendInColor, hazeBlendInColor); - COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_BLEND_OUT_COLOR, Haze, haze, HazeBlendOutColor, hazeBlendOutColor); + COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_COLOR, Haze, haze, HazeColor, hazeColor); + COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_GLARE_COLOR, Haze, haze, HazeGlareColor, hazeGlareColor); COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_ENABLE_LIGHT_BLEND, Haze, haze, HazeEnableLightBlend, hazeEnableLightBlend); COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_LIGHT_BLEND_ANGLE, Haze, haze, HazeLightBlendAngle, hazeLightBlendAngle); @@ -48,8 +48,8 @@ void HazePropertyGroup::copyToScriptValue(const EntityPropertyFlags& desiredProp void HazePropertyGroup::copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings) { COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeRange, float, setHazeRange); - COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeBlendInColor, xColor, setHazeBlendInColor); - COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeBlendOutColor, xColor, setHazeBlendOutColor); + COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeColor, xColor, setHazeColor); + COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeGlareColor, xColor, setHazeGlareColor); COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeEnableLightBlend, bool, setHazeEnableLightBlend); COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeLightBlendAngle, float, setHazeLightBlendAngle); @@ -66,8 +66,8 @@ void HazePropertyGroup::copyFromScriptValue(const QScriptValue& object, bool& _d void HazePropertyGroup::merge(const HazePropertyGroup& other) { COPY_PROPERTY_IF_CHANGED(hazeRange); - COPY_PROPERTY_IF_CHANGED(hazeBlendInColor); - COPY_PROPERTY_IF_CHANGED(hazeBlendOutColor); + COPY_PROPERTY_IF_CHANGED(hazeColor); + COPY_PROPERTY_IF_CHANGED(hazeGlareColor); COPY_PROPERTY_IF_CHANGED(hazeEnableLightBlend); COPY_PROPERTY_IF_CHANGED(hazeLightBlendAngle); @@ -86,8 +86,8 @@ void HazePropertyGroup::debugDump() const { qCDebug(entities) << " HazePropertyGroup: ---------------------------------------------"; qCDebug(entities) << " _hazeRange:" << _hazeRange; - qCDebug(entities) << " _hazeBlendInColor:" << _hazeBlendInColor; - qCDebug(entities) << " _hazeBlendOutColor:" << _hazeBlendOutColor; + qCDebug(entities) << " _hazeColor:" << _hazeColor; + qCDebug(entities) << " _hazeGlareColor:" << _hazeGlareColor; qCDebug(entities) << " _hazeEnableLightBlend:" << _hazeEnableLightBlend; qCDebug(entities) << " _hazeLightBlendAngle:" << _hazeLightBlendAngle; @@ -106,11 +106,11 @@ void HazePropertyGroup::listChangedProperties(QList& out) { if (hazeRangeChanged()) { out << "haze-hazeRange"; } - if (hazeBlendInColorChanged()) { - out << "haze-hazeBlendInColor"; + if (hazeColorChanged()) { + out << "haze-hazeColor"; } - if (hazeBlendOutColorChanged()) { - out << "haze-hazeBlendOutColor"; + if (hazeGlareColorChanged()) { + out << "haze-hazeGlareColor"; } if (hazeEnableLightBlendChanged()) { out << "haze-hazeEnableLightBlend"; @@ -154,8 +154,8 @@ bool HazePropertyGroup::appendToEditPacket(OctreePacketData* packetData, bool successPropertyFits = true; APPEND_ENTITY_PROPERTY(PROP_HAZE_RANGE, getHazeRange()); - APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, getHazeBlendInColor()); - APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, getHazeBlendOutColor()); + APPEND_ENTITY_PROPERTY(PROP_HAZE_COLOR, getHazeColor()); + APPEND_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, getHazeGlareColor()); APPEND_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, getHazeEnableLightBlend()); APPEND_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, getHazeLightBlendAngle()); @@ -179,8 +179,8 @@ bool HazePropertyGroup::decodeFromEditPacket(EntityPropertyFlags& propertyFlags, bool somethingChanged = false; READ_ENTITY_PROPERTY(PROP_HAZE_RANGE, float, setHazeRange); - READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, xColor, setHazeBlendInColor); - READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, xColor, setHazeBlendOutColor); + READ_ENTITY_PROPERTY(PROP_HAZE_COLOR, xColor, setHazeColor); + READ_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, xColor, setHazeGlareColor); READ_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, bool, setHazeEnableLightBlend); READ_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, float, setHazeLightBlendAngle); @@ -195,8 +195,8 @@ bool HazePropertyGroup::decodeFromEditPacket(EntityPropertyFlags& propertyFlags, READ_ENTITY_PROPERTY(PROP_HAZE_KEYLIGHT_ALTITUDE, float, setHazeKeyLightAltitude); DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_RANGE, HazeRange); - DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_BLEND_IN_COLOR, HazeBlendInColor); - DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_BLEND_OUT_COLOR, HazeBlendOutColor); + DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_COLOR, HazeColor); + DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_GLARE_COLOR, HazeGlareColor); DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_ENABLE_LIGHT_BLEND, HazeEnableLightBlend); DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_LIGHT_BLEND_ANGLE, HazeLightBlendAngle); @@ -219,8 +219,8 @@ bool HazePropertyGroup::decodeFromEditPacket(EntityPropertyFlags& propertyFlags, void HazePropertyGroup::markAllChanged() { _hazeRangeChanged = true; - _hazeBlendInColorChanged = true; - _hazeBlendOutColorChanged = true; + _hazeColorChanged = true; + _hazeGlareColorChanged = true; _hazeEnableLightBlendChanged = true; _hazeLightBlendAngleChanged = true; @@ -239,8 +239,8 @@ EntityPropertyFlags HazePropertyGroup::getChangedProperties() const { EntityPropertyFlags changedProperties; CHECK_PROPERTY_CHANGE(PROP_HAZE_RANGE, hazeRange); - CHECK_PROPERTY_CHANGE(PROP_HAZE_BLEND_IN_COLOR, hazeBlendInColor); - CHECK_PROPERTY_CHANGE(PROP_HAZE_BLEND_OUT_COLOR, hazeBlendOutColor); + CHECK_PROPERTY_CHANGE(PROP_HAZE_COLOR, hazeColor); + CHECK_PROPERTY_CHANGE(PROP_HAZE_GLARE_COLOR, hazeGlareColor); CHECK_PROPERTY_CHANGE(PROP_HAZE_ENABLE_LIGHT_BLEND, hazeEnableLightBlend); CHECK_PROPERTY_CHANGE(PROP_HAZE_LIGHT_BLEND_ANGLE, hazeLightBlendAngle); @@ -259,8 +259,8 @@ EntityPropertyFlags HazePropertyGroup::getChangedProperties() const { void HazePropertyGroup::getProperties(EntityItemProperties& properties) const { COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeRange, getHazeRange); - COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeBlendInColor, getHazeBlendInColor); - COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeBlendOutColor, getHazeBlendOutColor); + COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeColor, getHazeColor); + COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeGlareColor, getHazeGlareColor); COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeEnableLightBlend, getHazeEnableLightBlend); COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeLightBlendAngle, getHazeLightBlendAngle); @@ -279,8 +279,8 @@ bool HazePropertyGroup::setProperties(const EntityItemProperties& properties) { bool somethingChanged = false; SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeRange, hazeRange, setHazeRange); - SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeBlendInColor, hazeBlendInColor, setHazeBlendInColor); - SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeBlendOutColor, hazeBlendOutColor, setHazeBlendOutColor); + SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeColor, hazeColor, setHazeColor); + SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeGlareColor, hazeGlareColor, setHazeGlareColor); SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeEnableLightBlend, hazeEnableLightBlend, setHazeEnableLightBlend); SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeLightBlendAngle, hazeLightBlendAngle, setHazeLightBlendAngle); @@ -301,8 +301,8 @@ EntityPropertyFlags HazePropertyGroup::getEntityProperties(EncodeBitstreamParams EntityPropertyFlags requestedProperties; requestedProperties += PROP_HAZE_RANGE; - requestedProperties += PROP_HAZE_BLEND_IN_COLOR; - requestedProperties += PROP_HAZE_BLEND_OUT_COLOR; + requestedProperties += PROP_HAZE_COLOR; + requestedProperties += PROP_HAZE_GLARE_COLOR; requestedProperties += PROP_HAZE_ENABLE_LIGHT_BLEND; requestedProperties += PROP_HAZE_LIGHT_BLEND_ANGLE; @@ -329,8 +329,8 @@ void HazePropertyGroup::appendSubclassData(OctreePacketData* packetData, EncodeB bool successPropertyFits = true; APPEND_ENTITY_PROPERTY(PROP_HAZE_RANGE, getHazeRange()); - APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, getHazeBlendInColor()); - APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, getHazeBlendOutColor()); + APPEND_ENTITY_PROPERTY(PROP_HAZE_COLOR, getHazeColor()); + APPEND_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, getHazeGlareColor()); APPEND_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, getHazeEnableLightBlend()); APPEND_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, getHazeLightBlendAngle()); @@ -354,8 +354,8 @@ int HazePropertyGroup::readEntitySubclassDataFromBuffer(const unsigned char* dat const unsigned char* dataAt = data; READ_ENTITY_PROPERTY(PROP_HAZE_RANGE, float, setHazeRange); - READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, xColor, setHazeBlendInColor); - READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, xColor, setHazeBlendOutColor); + READ_ENTITY_PROPERTY(PROP_HAZE_COLOR, xColor, setHazeColor); + READ_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, xColor, setHazeGlareColor); READ_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, bool, setHazeEnableLightBlend); READ_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, float, setHazeLightBlendAngle); diff --git a/libraries/entities/src/HazePropertyGroup.h b/libraries/entities/src/HazePropertyGroup.h index 4ec4a33a24..d1ce32c472 100644 --- a/libraries/entities/src/HazePropertyGroup.h +++ b/libraries/entities/src/HazePropertyGroup.h @@ -75,8 +75,8 @@ public: bool& somethingChanged) override; static const float DEFAULT_HAZE_RANGE; - static const xColor DEFAULT_HAZE_BLEND_IN_COLOR; - static const xColor DEFAULT_HAZE_BLEND_OUT_COLOR; + static const xColor DEFAULT_HAZE_COLOR; + static const xColor DEFAULT_HAZE_GLARE_COLOR; static const float DEFAULT_HAZE_LIGHT_BLEND_ANGLE; static const float DEFAULT_HAZE_CEILING; @@ -89,8 +89,8 @@ public: // Range only parameters DEFINE_PROPERTY(PROP_HAZE_RANGE, HazeRange, hazeRange, float, DEFAULT_HAZE_RANGE); - DEFINE_PROPERTY_REF(PROP_HAZE_BLEND_IN_COLOR, HazeBlendInColor, hazeBlendInColor, xColor, DEFAULT_HAZE_BLEND_IN_COLOR); - DEFINE_PROPERTY_REF(PROP_HAZE_BLEND_OUT_COLOR, HazeBlendOutColor, hazeBlendOutColor, xColor, DEFAULT_HAZE_BLEND_OUT_COLOR); + DEFINE_PROPERTY_REF(PROP_HAZE_COLOR, HazeColor, hazeColor, xColor, DEFAULT_HAZE_COLOR); + DEFINE_PROPERTY_REF(PROP_HAZE_GLARE_COLOR, HazeGlareColor, hazeGlareColor, xColor, DEFAULT_HAZE_GLARE_COLOR); DEFINE_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, HazeEnableLightBlend, hazeEnableLightBlend, bool, false); DEFINE_PROPERTY_REF(PROP_HAZE_LIGHT_BLEND_ANGLE, HazeLightBlendAngle, hazeLightBlendAngle, float, DEFAULT_HAZE_LIGHT_BLEND_ANGLE); diff --git a/libraries/entities/src/ZoneEntityItem.cpp b/libraries/entities/src/ZoneEntityItem.cpp index fefdefb6bc..6d5e9099d9 100644 --- a/libraries/entities/src/ZoneEntityItem.cpp +++ b/libraries/entities/src/ZoneEntityItem.cpp @@ -338,22 +338,22 @@ float ZoneEntityItem::getHazeRange() const { return _hazeRange; } -void ZoneEntityItem::setHazeBlendInColor(const xColor hazeBlendInColor) { - _hazeBlendInColor = hazeBlendInColor; +void ZoneEntityItem::setHazeColor(const xColor hazeColor) { + _hazeColor = hazeColor; _hazePropertiesChanged = true; } -xColor ZoneEntityItem::getHazeBlendInColor() const { - return _hazeBlendInColor; +xColor ZoneEntityItem::getHazeColor() const { + return _hazeColor; } -void ZoneEntityItem::setHazeBlendOutColor(const xColor hazeBlendOutColor) { - _hazeBlendOutColor = hazeBlendOutColor; +void ZoneEntityItem::setHazeGlareColor(const xColor hazeGlareColor) { + _hazeGlareColor = hazeGlareColor; _hazePropertiesChanged = true; } -xColor ZoneEntityItem::getHazeBlendOutColor()const { - return _hazeBlendOutColor; +xColor ZoneEntityItem::getHazeGlareColor()const { + return _hazeGlareColor; } void ZoneEntityItem::setHazeEnableLightBlend(const bool hazeEnableLightBlend) { diff --git a/libraries/entities/src/ZoneEntityItem.h b/libraries/entities/src/ZoneEntityItem.h index 9c1c9fd9c1..ebfac294b6 100644 --- a/libraries/entities/src/ZoneEntityItem.h +++ b/libraries/entities/src/ZoneEntityItem.h @@ -75,10 +75,10 @@ public: void setHazeRange(const float hazeRange); float getHazeRange() const; - void setHazeBlendInColor(const xColor hazeBlendInColor); - xColor getHazeBlendInColor() const; - void setHazeBlendOutColor(const xColor hazeBlendOutColor); - xColor getHazeBlendOutColor() const; + void setHazeColor(const xColor hazeColor); + xColor getHazeColor() const; + void setHazeGlareColor(const xColor hazeGlareColor); + xColor getHazeGlareColor() const; void setHazeEnableLightBlend(const bool hazeEnableLightBlend); bool getHazeEnableLightBlend() const; void setHazeLightBlendAngle(const float hazeLightBlendAngle); @@ -149,8 +149,8 @@ protected: uint8_t _hazeMode{ (uint8_t)COMPONENT_MODE_INHERIT }; float _hazeRange{ HazePropertyGroup::DEFAULT_HAZE_RANGE }; - xColor _hazeBlendInColor{ HazePropertyGroup::DEFAULT_HAZE_BLEND_IN_COLOR }; - xColor _hazeBlendOutColor{ HazePropertyGroup::DEFAULT_HAZE_BLEND_OUT_COLOR }; + xColor _hazeColor{ HazePropertyGroup::DEFAULT_HAZE_COLOR }; + xColor _hazeGlareColor{ HazePropertyGroup::DEFAULT_HAZE_GLARE_COLOR }; bool _hazeEnableLightBlend{ false }; float _hazeLightBlendAngle{ HazePropertyGroup::DEFAULT_HAZE_LIGHT_BLEND_ANGLE }; diff --git a/libraries/model/src/model/Stage.h b/libraries/model/src/model/Stage.h index 256c25524b..b8f1a3908a 100644 --- a/libraries/model/src/model/Stage.h +++ b/libraries/model/src/model/Stage.h @@ -188,10 +188,10 @@ public: void setHazeRange(float hazeRange) { _hazeRange = hazeRange; } float getHazeRange() const { return _hazeRange; } - void setHazeBlendInColor(const xColor hazeBlendInColor) { _hazeBlendInColor = hazeBlendInColor; } - xColor getHazeBlendInColor() { return _hazeBlendInColor; } - void setHazeBlendOutColor(const xColor hazeBlendOutColor) { _hazeBlendOutColor = hazeBlendOutColor; } - xColor getHazeBlendOutColor() const { return _hazeBlendOutColor; } + void setHazeColor(const xColor hazeColor) { _hazeColor = hazeColor; } + xColor getHazeColor() { return _hazeColor; } + void setHazeGlareColor(const xColor hazeGlareColor) { _hazeGlareColor = hazeGlareColor; } + xColor getHazeGlareColor() const { return _hazeGlareColor; } void setHazeEnableLightBlend(bool hazeEnableLightBlend) { _hazeEnableLightBlend = hazeEnableLightBlend; } bool getHazeEnableLightBlend() const { return _hazeEnableLightBlend; } void setHazeLightBlendAngle(float hazeLightBlendAngle) { _hazeLightBlendAngle = hazeLightBlendAngle; } @@ -220,8 +220,8 @@ protected: uint8_t _hazeMode = (uint8_t)HAZE_OFF; float _hazeRange; - xColor _hazeBlendInColor; - xColor _hazeBlendOutColor; + xColor _hazeColor; + xColor _hazeGlareColor; bool _hazeEnableLightBlend; float _hazeLightBlendAngle; diff --git a/libraries/script-engine/src/SceneScriptingInterface.cpp b/libraries/script-engine/src/SceneScriptingInterface.cpp index dde06a6785..41eb10be19 100644 --- a/libraries/script-engine/src/SceneScriptingInterface.cpp +++ b/libraries/script-engine/src/SceneScriptingInterface.cpp @@ -155,17 +155,17 @@ void SceneScripting::Stage::setHazeRange(const float hazeRange) { float SceneScripting::Stage::getHazeRange() const { return _skyStage->getHazeRange(); } -void SceneScripting::Stage::setHazeBlendInColor(const xColor hazeBlendInColor) { - _skyStage->setHazeBlendInColor(hazeBlendInColor); +void SceneScripting::Stage::setHazeColor(const xColor hazeColor) { + _skyStage->setHazeColor(hazeColor); } -xColor SceneScripting::Stage::getHazeBlendInColor() const { - return _skyStage->getHazeBlendInColor(); +xColor SceneScripting::Stage::getHazeColor() const { + return _skyStage->getHazeColor(); } -void SceneScripting::Stage::setHazeBlendOutColor(const xColor hazeBlendOutColor) { - _skyStage->setHazeBlendOutColor(hazeBlendOutColor); +void SceneScripting::Stage::setHazeGlareColor(const xColor hazeGlareColor) { + _skyStage->setHazeGlareColor(hazeGlareColor); } -xColor SceneScripting::Stage::getHazeBlendOutColor() const { - return _skyStage->getHazeBlendOutColor(); +xColor SceneScripting::Stage::getHazeGlareColor() const { + return _skyStage->getHazeGlareColor(); } void SceneScripting::Stage::setHazeEnableLightBlend(const bool hazeEnableLightBlend) { _skyStage->setHazeEnableLightBlend(hazeEnableLightBlend); diff --git a/libraries/script-engine/src/SceneScriptingInterface.h b/libraries/script-engine/src/SceneScriptingInterface.h index 5e6db82b3d..ed3158848b 100644 --- a/libraries/script-engine/src/SceneScriptingInterface.h +++ b/libraries/script-engine/src/SceneScriptingInterface.h @@ -129,13 +129,13 @@ namespace SceneScripting { void setHazeRange(float value); float getHazeRange() const; - Q_PROPERTY(xColor hazeBlendInColor READ getHazeBlendInColor WRITE setHazeBlendInColor) - void setHazeBlendInColor(xColor value); - xColor getHazeBlendInColor() const; + Q_PROPERTY(xColor hazeColor READ getHazeColor WRITE setHazeColor) + void setHazeColor(xColor value); + xColor getHazeColor() const; - Q_PROPERTY(xColor hazeBlendOutColor READ getHazeBlendOutColor WRITE setHazeBlendOutColor) - void setHazeBlendOutColor(xColor value); - xColor getHazeBlendOutColor() const; + Q_PROPERTY(xColor hazeGlareColor READ getHazeGlareColor WRITE setHazeGlareColor) + void setHazeGlareColor(xColor value); + xColor getHazeGlareColor() const; Q_PROPERTY(bool hazeEnableLightBlend READ getHazeEnableLightBlend WRITE setHazeEnableLightBlend) void setHazeEnableLightBlend(bool value); diff --git a/scripts/system/html/js/entityProperties.js b/scripts/system/html/js/entityProperties.js index 07ce858f86..bbb59cab04 100644 --- a/scripts/system/html/js/entityProperties.js +++ b/scripts/system/html/js/entityProperties.js @@ -678,14 +678,14 @@ function loaded() { var elZoneHazeModeEnabled = document.getElementById("property-zone-haze-mode-enabled"); var elZoneHazeRange = document.getElementById("property-zone-haze-range"); - var elZoneHazeBlendInColor = document.getElementById("property-zone-haze-blend-in-color"); - var elZoneHazeBlendInColorRed = document.getElementById("property-zone-haze-blend-in-color-red"); - var elZoneHazeBlendInColorGreen = document.getElementById("property-zone-haze-blend-in-color-green"); - var elZoneHazeBlendInColorBlue = document.getElementById("property-zone-haze-blend-in-color-blue"); - var elZoneHazeBlendOutColor = document.getElementById("property-zone-haze-blend-out-color"); - var elZoneHazeBlendOutColorRed = document.getElementById("property-zone-haze-blend-out-color-red"); - var elZoneHazeBlendOutColorGreen = document.getElementById("property-zone-haze-blend-out-color-green"); - var elZoneHazeBlendOutColorBlue = document.getElementById("property-zone-haze-blend-out-color-blue"); + var elZoneHazeColor = document.getElementById("property-zone-haze-blend-in-color"); + var elZoneHazeColorRed = document.getElementById("property-zone-haze-blend-in-color-red"); + var elZoneHazeColorGreen = document.getElementById("property-zone-haze-blend-in-color-green"); + var elZoneHazeColorBlue = document.getElementById("property-zone-haze-blend-in-color-blue"); + var elZoneHazeGlareColor = document.getElementById("property-zone-haze-blend-out-color"); + var elZoneHazeGlareColorRed = document.getElementById("property-zone-haze-blend-out-color-red"); + var elZoneHazeGlareColorGreen = document.getElementById("property-zone-haze-blend-out-color-green"); + var elZoneHazeGlareColorBlue = document.getElementById("property-zone-haze-blend-out-color-blue"); var elZoneHazeEnableLightBlend = document.getElementById("property-zone-haze-enable-light-blend"); var elZoneHazeLightBlendAngle = document.getElementById("property-zone-haze-blend-angle"); @@ -1041,24 +1041,24 @@ function loaded() { elZoneHazeModeEnabled.checked = (properties.hazeMode == 'enabled'); elZoneHazeRange.value = properties.haze.hazeRange.toFixed(0); - elZoneHazeBlendInColor.style.backgroundColor = "rgb(" + - properties.haze.hazeBlendInColor.red + "," + - properties.haze.hazeBlendInColor.green + "," + - properties.haze.hazeBlendInColor.blue + ")"; + elZoneHazeColor.style.backgroundColor = "rgb(" + + properties.haze.hazeColor.red + "," + + properties.haze.hazeColor.green + "," + + properties.haze.hazeColor.blue + ")"; - elZoneHazeBlendInColorRed.value = properties.haze.hazeBlendInColor.red; - elZoneHazeBlendInColorGreen.value = properties.haze.hazeBlendInColor.green; - elZoneHazeBlendInColorBlue.value = properties.haze.hazeBlendInColor.blue; + elZoneHazeColorRed.value = properties.haze.hazeColor.red; + elZoneHazeColorGreen.value = properties.haze.hazeColor.green; + elZoneHazeColorBlue.value = properties.haze.hazeColor.blue; elZoneHazeBackgroundBlend.value = properties.haze.hazeBackgroundBlend.toFixed(2); - elZoneHazeBlendOutColor.style.backgroundColor = "rgb(" + - properties.haze.hazeBlendOutColor.red + "," + - properties.haze.hazeBlendOutColor.green + "," + - properties.haze.hazeBlendOutColor.blue + ")"; + elZoneHazeGlareColor.style.backgroundColor = "rgb(" + + properties.haze.hazeGlareColor.red + "," + + properties.haze.hazeGlareColor.green + "," + + properties.haze.hazeGlareColor.blue + ")"; - elZoneHazeBlendOutColorRed.value = properties.haze.hazeBlendOutColor.red; - elZoneHazeBlendOutColorGreen.value = properties.haze.hazeBlendOutColor.green; - elZoneHazeBlendOutColorBlue.value = properties.haze.hazeBlendOutColor.blue; + elZoneHazeGlareColorRed.value = properties.haze.hazeGlareColor.red; + elZoneHazeGlareColorGreen.value = properties.haze.hazeGlareColor.green; + elZoneHazeGlareColorBlue.value = properties.haze.hazeGlareColor.blue; elZoneHazeEnableLightBlend.checked = properties.haze.hazeEnableLightBlend; elZoneHazeLightBlendAngle.value = properties.haze.hazeLightBlendAngle.toFixed(0); @@ -1487,17 +1487,17 @@ function loaded() { onSubmit: function(hsb, hex, rgb, el) { $(el).css('background-color', '#' + hex); $(el).colpickHide(); - emitColorPropertyUpdate('hazeBlendInColor', rgb.r, rgb.g, rgb.b, 'haze'); + emitColorPropertyUpdate('hazeColor', rgb.r, rgb.g, rgb.b, 'haze'); } })); - var zoneHazeBlendInColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('haze', 'hazeBlendInColor', - elZoneHazeBlendInColorRed, - elZoneHazeBlendInColorGreen, - elZoneHazeBlendInColorBlue); + var zoneHazeColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('haze', 'hazeColor', + elZoneHazeColorRed, + elZoneHazeColorGreen, + elZoneHazeColorBlue); - elZoneHazeBlendInColorRed.addEventListener('change', zoneHazeBlendInColorChangeFunction); - elZoneHazeBlendInColorGreen.addEventListener('change', zoneHazeBlendInColorChangeFunction); - elZoneHazeBlendInColorBlue.addEventListener('change', zoneHazeBlendInColorChangeFunction); + elZoneHazeColorRed.addEventListener('change', zoneHazeColorChangeFunction); + elZoneHazeColorGreen.addEventListener('change', zoneHazeColorChangeFunction); + elZoneHazeColorBlue.addEventListener('change', zoneHazeColorChangeFunction); colorPickers.push($('#property-zone-haze-blend-out-color').colpick({ colorScheme: 'dark', @@ -1512,17 +1512,17 @@ function loaded() { onSubmit: function(hsb, hex, rgb, el) { $(el).css('background-color', '#' + hex); $(el).colpickHide(); - emitColorPropertyUpdate('hazeBlendOutColor', rgb.r, rgb.g, rgb.b, 'haze'); + emitColorPropertyUpdate('hazeGlareColor', rgb.r, rgb.g, rgb.b, 'haze'); } })); - var zoneHazeBlendOutColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('haze', 'hazeBlendOutColor', - elZoneHazeBlendOutColorRed, - elZoneHazeBlendOutColorGreen, - elZoneHazeBlendOutColorBlue); + var zoneHazeGlareColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('haze', 'hazeGlareColor', + elZoneHazeGlareColorRed, + elZoneHazeGlareColorGreen, + elZoneHazeGlareColorBlue); - elZoneHazeBlendOutColorRed.addEventListener('change', zoneHazeBlendOutColorChangeFunction); - elZoneHazeBlendOutColorGreen.addEventListener('change', zoneHazeBlendOutColorChangeFunction); - elZoneHazeBlendOutColorBlue.addEventListener('change', zoneHazeBlendOutColorChangeFunction); + elZoneHazeGlareColorRed.addEventListener('change', zoneHazeGlareColorChangeFunction); + elZoneHazeGlareColorGreen.addEventListener('change', zoneHazeGlareColorChangeFunction); + elZoneHazeGlareColorBlue.addEventListener('change', zoneHazeGlareColorChangeFunction); elZoneHazeEnableLightBlend.addEventListener('change', createEmitGroupCheckedPropertyUpdateFunction('haze', 'hazeEnableLightBlend')); elZoneHazeLightBlendAngle.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('haze', 'hazeLightBlendAngle'));