Changed blend-in colour and blend-out colour to colour and glare colour

This commit is contained in:
Nissim Hadar 2017-10-13 12:21:00 -07:00
parent 5bfbaf4860
commit c76229934c
11 changed files with 118 additions and 118 deletions

View file

@ -341,10 +341,10 @@ void ZoneEntityRenderer::updateHazeFromEntity(const TypedEntityPointer& entity)
haze->setAltitudeBased(_hazeProperties.getHazeAltitudeEffect()); haze->setAltitudeBased(_hazeProperties.getHazeAltitudeEffect());
haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeRange())); haze->setHazeRangeFactor(model::convertHazeRangeToHazeRangeFactor(_hazeProperties.getHazeRange()));
xColor hazeBlendInColor = _hazeProperties.getHazeBlendInColor(); xColor hazeColor = _hazeProperties.getHazeColor();
haze->setHazeColor(glm::vec3(hazeBlendInColor.red / 255.0, hazeBlendInColor.green / 255.0, hazeBlendInColor.blue / 255.0)); haze->setHazeColor(glm::vec3(hazeColor.red / 255.0, hazeColor.green / 255.0, hazeColor.blue / 255.0));
xColor hazeBlendOutColor = _hazeProperties.getHazeBlendOutColor(); xColor hazeGlareColor = _hazeProperties.getHazeGlareColor();
haze->setDirectionalLightColor(glm::vec3(hazeBlendOutColor.red / 255.0, hazeBlendOutColor.green / 255.0, hazeBlendOutColor.blue / 255.0)); haze->setDirectionalLightColor(glm::vec3(hazeGlareColor.red / 255.0, hazeGlareColor.green / 255.0, hazeGlareColor.blue / 255.0));
haze->setHazeEnableLightBlend(_hazeProperties.getHazeEnableLightBlend()); haze->setHazeEnableLightBlend(_hazeProperties.getHazeEnableLightBlend());
haze->setDirectionalLightBlend(model::convertDirectionalLightAngleToPower(_hazeProperties.getHazeLightBlendAngle())); haze->setDirectionalLightBlend(model::convertDirectionalLightAngleToPower(_hazeProperties.getHazeLightBlendAngle()));

View file

@ -1156,8 +1156,8 @@ void EntityItemProperties::entityPropertyFlagsFromScriptValue(const QScriptValue
ADD_PROPERTY_TO_MAP(PROP_HAZE_MODE, HazeMode, hazeMode, uint32_t); 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_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_COLOR, Haze, haze, HazeColor, hazeColor);
ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_BLEND_OUT_COLOR, Haze, haze, HazeBlendOutColor, hazeBlendOutColor); 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_ENABLE_LIGHT_BLEND, Haze, haze, HazeEnableLightBlend, hazeEnableLightBlend);
ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_LIGHT_BLEND_ANGLE, Haze, haze, HazeLightBlendAngle, hazeLightBlendAngle); ADD_GROUP_PROPERTY_TO_MAP(PROP_HAZE_LIGHT_BLEND_ANGLE, Haze, haze, HazeLightBlendAngle, hazeLightBlendAngle);

View file

@ -235,8 +235,8 @@ enum EntityPropertyList {
PROP_HAZE_MODE = PROP_COLOR, PROP_HAZE_MODE = PROP_COLOR,
PROP_HAZE_RANGE = PROP_INTENSITY, PROP_HAZE_RANGE = PROP_INTENSITY,
PROP_HAZE_BLEND_IN_COLOR = PROP_CUTOFF, PROP_HAZE_COLOR = PROP_CUTOFF,
PROP_HAZE_BLEND_OUT_COLOR = PROP_EXPONENT, PROP_HAZE_GLARE_COLOR = PROP_EXPONENT,
PROP_HAZE_ENABLE_LIGHT_BLEND = PROP_IS_SPOTLIGHT, PROP_HAZE_ENABLE_LIGHT_BLEND = PROP_IS_SPOTLIGHT,
PROP_HAZE_LIGHT_BLEND_ANGLE = PROP_DIFFUSE_COLOR, PROP_HAZE_LIGHT_BLEND_ANGLE = PROP_DIFFUSE_COLOR,

View file

@ -16,8 +16,8 @@
#include "EntityItemPropertiesMacros.h" #include "EntityItemPropertiesMacros.h"
const float HazePropertyGroup::DEFAULT_HAZE_RANGE{ 1000.0f }; 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_COLOR{ 128, 154, 179 }; // Bluish
const xColor HazePropertyGroup::DEFAULT_HAZE_BLEND_OUT_COLOR{ 255, 229, 179 }; // Yellowish 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_LIGHT_BLEND_ANGLE{ 20.0 };
const float HazePropertyGroup::DEFAULT_HAZE_CEILING{ 200.0f }; 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 { 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_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_COLOR, Haze, haze, HazeColor, hazeColor);
COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_BLEND_OUT_COLOR, Haze, haze, HazeBlendOutColor, hazeBlendOutColor); 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_ENABLE_LIGHT_BLEND, Haze, haze, HazeEnableLightBlend, hazeEnableLightBlend);
COPY_GROUP_PROPERTY_TO_QSCRIPTVALUE(PROP_HAZE_LIGHT_BLEND_ANGLE, Haze, haze, HazeLightBlendAngle, hazeLightBlendAngle); 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) { void HazePropertyGroup::copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings) {
COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeRange, float, setHazeRange); COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeRange, float, setHazeRange);
COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeBlendInColor, xColor, setHazeBlendInColor); COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeColor, xColor, setHazeColor);
COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeBlendOutColor, xColor, setHazeBlendOutColor); COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeGlareColor, xColor, setHazeGlareColor);
COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeEnableLightBlend, bool, setHazeEnableLightBlend); COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeEnableLightBlend, bool, setHazeEnableLightBlend);
COPY_GROUP_PROPERTY_FROM_QSCRIPTVALUE(haze, hazeLightBlendAngle, float, setHazeLightBlendAngle); 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) { void HazePropertyGroup::merge(const HazePropertyGroup& other) {
COPY_PROPERTY_IF_CHANGED(hazeRange); COPY_PROPERTY_IF_CHANGED(hazeRange);
COPY_PROPERTY_IF_CHANGED(hazeBlendInColor); COPY_PROPERTY_IF_CHANGED(hazeColor);
COPY_PROPERTY_IF_CHANGED(hazeBlendOutColor); COPY_PROPERTY_IF_CHANGED(hazeGlareColor);
COPY_PROPERTY_IF_CHANGED(hazeEnableLightBlend); COPY_PROPERTY_IF_CHANGED(hazeEnableLightBlend);
COPY_PROPERTY_IF_CHANGED(hazeLightBlendAngle); COPY_PROPERTY_IF_CHANGED(hazeLightBlendAngle);
@ -86,8 +86,8 @@ void HazePropertyGroup::debugDump() const {
qCDebug(entities) << " HazePropertyGroup: ---------------------------------------------"; qCDebug(entities) << " HazePropertyGroup: ---------------------------------------------";
qCDebug(entities) << " _hazeRange:" << _hazeRange; qCDebug(entities) << " _hazeRange:" << _hazeRange;
qCDebug(entities) << " _hazeBlendInColor:" << _hazeBlendInColor; qCDebug(entities) << " _hazeColor:" << _hazeColor;
qCDebug(entities) << " _hazeBlendOutColor:" << _hazeBlendOutColor; qCDebug(entities) << " _hazeGlareColor:" << _hazeGlareColor;
qCDebug(entities) << " _hazeEnableLightBlend:" << _hazeEnableLightBlend; qCDebug(entities) << " _hazeEnableLightBlend:" << _hazeEnableLightBlend;
qCDebug(entities) << " _hazeLightBlendAngle:" << _hazeLightBlendAngle; qCDebug(entities) << " _hazeLightBlendAngle:" << _hazeLightBlendAngle;
@ -106,11 +106,11 @@ void HazePropertyGroup::listChangedProperties(QList<QString>& out) {
if (hazeRangeChanged()) { if (hazeRangeChanged()) {
out << "haze-hazeRange"; out << "haze-hazeRange";
} }
if (hazeBlendInColorChanged()) { if (hazeColorChanged()) {
out << "haze-hazeBlendInColor"; out << "haze-hazeColor";
} }
if (hazeBlendOutColorChanged()) { if (hazeGlareColorChanged()) {
out << "haze-hazeBlendOutColor"; out << "haze-hazeGlareColor";
} }
if (hazeEnableLightBlendChanged()) { if (hazeEnableLightBlendChanged()) {
out << "haze-hazeEnableLightBlend"; out << "haze-hazeEnableLightBlend";
@ -154,8 +154,8 @@ bool HazePropertyGroup::appendToEditPacket(OctreePacketData* packetData,
bool successPropertyFits = true; bool successPropertyFits = true;
APPEND_ENTITY_PROPERTY(PROP_HAZE_RANGE, getHazeRange()); APPEND_ENTITY_PROPERTY(PROP_HAZE_RANGE, getHazeRange());
APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, getHazeBlendInColor()); APPEND_ENTITY_PROPERTY(PROP_HAZE_COLOR, getHazeColor());
APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, getHazeBlendOutColor()); APPEND_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, getHazeGlareColor());
APPEND_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, getHazeEnableLightBlend()); APPEND_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, getHazeEnableLightBlend());
APPEND_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, getHazeLightBlendAngle()); APPEND_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, getHazeLightBlendAngle());
@ -179,8 +179,8 @@ bool HazePropertyGroup::decodeFromEditPacket(EntityPropertyFlags& propertyFlags,
bool somethingChanged = false; bool somethingChanged = false;
READ_ENTITY_PROPERTY(PROP_HAZE_RANGE, float, setHazeRange); READ_ENTITY_PROPERTY(PROP_HAZE_RANGE, float, setHazeRange);
READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, xColor, setHazeBlendInColor); READ_ENTITY_PROPERTY(PROP_HAZE_COLOR, xColor, setHazeColor);
READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, xColor, setHazeBlendOutColor); READ_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, xColor, setHazeGlareColor);
READ_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, bool, setHazeEnableLightBlend); READ_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, bool, setHazeEnableLightBlend);
READ_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, float, setHazeLightBlendAngle); 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); 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_RANGE, HazeRange);
DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_BLEND_IN_COLOR, HazeBlendInColor); DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_COLOR, HazeColor);
DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_BLEND_OUT_COLOR, HazeBlendOutColor); 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_ENABLE_LIGHT_BLEND, HazeEnableLightBlend);
DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_LIGHT_BLEND_ANGLE, HazeLightBlendAngle); DECODE_GROUP_PROPERTY_HAS_CHANGED(PROP_HAZE_LIGHT_BLEND_ANGLE, HazeLightBlendAngle);
@ -219,8 +219,8 @@ bool HazePropertyGroup::decodeFromEditPacket(EntityPropertyFlags& propertyFlags,
void HazePropertyGroup::markAllChanged() { void HazePropertyGroup::markAllChanged() {
_hazeRangeChanged = true; _hazeRangeChanged = true;
_hazeBlendInColorChanged = true; _hazeColorChanged = true;
_hazeBlendOutColorChanged = true; _hazeGlareColorChanged = true;
_hazeEnableLightBlendChanged = true; _hazeEnableLightBlendChanged = true;
_hazeLightBlendAngleChanged = true; _hazeLightBlendAngleChanged = true;
@ -239,8 +239,8 @@ EntityPropertyFlags HazePropertyGroup::getChangedProperties() const {
EntityPropertyFlags changedProperties; EntityPropertyFlags changedProperties;
CHECK_PROPERTY_CHANGE(PROP_HAZE_RANGE, hazeRange); CHECK_PROPERTY_CHANGE(PROP_HAZE_RANGE, hazeRange);
CHECK_PROPERTY_CHANGE(PROP_HAZE_BLEND_IN_COLOR, hazeBlendInColor); CHECK_PROPERTY_CHANGE(PROP_HAZE_COLOR, hazeColor);
CHECK_PROPERTY_CHANGE(PROP_HAZE_BLEND_OUT_COLOR, hazeBlendOutColor); CHECK_PROPERTY_CHANGE(PROP_HAZE_GLARE_COLOR, hazeGlareColor);
CHECK_PROPERTY_CHANGE(PROP_HAZE_ENABLE_LIGHT_BLEND, hazeEnableLightBlend); CHECK_PROPERTY_CHANGE(PROP_HAZE_ENABLE_LIGHT_BLEND, hazeEnableLightBlend);
CHECK_PROPERTY_CHANGE(PROP_HAZE_LIGHT_BLEND_ANGLE, hazeLightBlendAngle); CHECK_PROPERTY_CHANGE(PROP_HAZE_LIGHT_BLEND_ANGLE, hazeLightBlendAngle);
@ -259,8 +259,8 @@ EntityPropertyFlags HazePropertyGroup::getChangedProperties() const {
void HazePropertyGroup::getProperties(EntityItemProperties& properties) const { void HazePropertyGroup::getProperties(EntityItemProperties& properties) const {
COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeRange, getHazeRange); 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, HazeColor, getHazeColor);
COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeBlendOutColor, getHazeBlendOutColor); 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, HazeEnableLightBlend, getHazeEnableLightBlend);
COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeLightBlendAngle, getHazeLightBlendAngle); COPY_ENTITY_GROUP_PROPERTY_TO_PROPERTIES(Haze, HazeLightBlendAngle, getHazeLightBlendAngle);
@ -279,8 +279,8 @@ bool HazePropertyGroup::setProperties(const EntityItemProperties& properties) {
bool somethingChanged = false; bool somethingChanged = false;
SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeRange, hazeRange, setHazeRange); 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, HazeColor, hazeColor, setHazeColor);
SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeBlendOutColor, hazeBlendOutColor, setHazeBlendOutColor); 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, HazeEnableLightBlend, hazeEnableLightBlend, setHazeEnableLightBlend);
SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeLightBlendAngle, hazeLightBlendAngle, setHazeLightBlendAngle); SET_ENTITY_GROUP_PROPERTY_FROM_PROPERTIES(Haze, HazeLightBlendAngle, hazeLightBlendAngle, setHazeLightBlendAngle);
@ -301,8 +301,8 @@ EntityPropertyFlags HazePropertyGroup::getEntityProperties(EncodeBitstreamParams
EntityPropertyFlags requestedProperties; EntityPropertyFlags requestedProperties;
requestedProperties += PROP_HAZE_RANGE; requestedProperties += PROP_HAZE_RANGE;
requestedProperties += PROP_HAZE_BLEND_IN_COLOR; requestedProperties += PROP_HAZE_COLOR;
requestedProperties += PROP_HAZE_BLEND_OUT_COLOR; requestedProperties += PROP_HAZE_GLARE_COLOR;
requestedProperties += PROP_HAZE_ENABLE_LIGHT_BLEND; requestedProperties += PROP_HAZE_ENABLE_LIGHT_BLEND;
requestedProperties += PROP_HAZE_LIGHT_BLEND_ANGLE; requestedProperties += PROP_HAZE_LIGHT_BLEND_ANGLE;
@ -329,8 +329,8 @@ void HazePropertyGroup::appendSubclassData(OctreePacketData* packetData, EncodeB
bool successPropertyFits = true; bool successPropertyFits = true;
APPEND_ENTITY_PROPERTY(PROP_HAZE_RANGE, getHazeRange()); APPEND_ENTITY_PROPERTY(PROP_HAZE_RANGE, getHazeRange());
APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, getHazeBlendInColor()); APPEND_ENTITY_PROPERTY(PROP_HAZE_COLOR, getHazeColor());
APPEND_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, getHazeBlendOutColor()); APPEND_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, getHazeGlareColor());
APPEND_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, getHazeEnableLightBlend()); APPEND_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, getHazeEnableLightBlend());
APPEND_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, getHazeLightBlendAngle()); 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; const unsigned char* dataAt = data;
READ_ENTITY_PROPERTY(PROP_HAZE_RANGE, float, setHazeRange); READ_ENTITY_PROPERTY(PROP_HAZE_RANGE, float, setHazeRange);
READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_IN_COLOR, xColor, setHazeBlendInColor); READ_ENTITY_PROPERTY(PROP_HAZE_COLOR, xColor, setHazeColor);
READ_ENTITY_PROPERTY(PROP_HAZE_BLEND_OUT_COLOR, xColor, setHazeBlendOutColor); READ_ENTITY_PROPERTY(PROP_HAZE_GLARE_COLOR, xColor, setHazeGlareColor);
READ_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, bool, setHazeEnableLightBlend); READ_ENTITY_PROPERTY(PROP_HAZE_ENABLE_LIGHT_BLEND, bool, setHazeEnableLightBlend);
READ_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, float, setHazeLightBlendAngle); READ_ENTITY_PROPERTY(PROP_HAZE_LIGHT_BLEND_ANGLE, float, setHazeLightBlendAngle);

View file

@ -75,8 +75,8 @@ public:
bool& somethingChanged) override; bool& somethingChanged) override;
static const float DEFAULT_HAZE_RANGE; static const float DEFAULT_HAZE_RANGE;
static const xColor DEFAULT_HAZE_BLEND_IN_COLOR; static const xColor DEFAULT_HAZE_COLOR;
static const xColor DEFAULT_HAZE_BLEND_OUT_COLOR; static const xColor DEFAULT_HAZE_GLARE_COLOR;
static const float DEFAULT_HAZE_LIGHT_BLEND_ANGLE; static const float DEFAULT_HAZE_LIGHT_BLEND_ANGLE;
static const float DEFAULT_HAZE_CEILING; static const float DEFAULT_HAZE_CEILING;
@ -89,8 +89,8 @@ public:
// Range only parameters // Range only parameters
DEFINE_PROPERTY(PROP_HAZE_RANGE, HazeRange, hazeRange, float, DEFAULT_HAZE_RANGE); 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_COLOR, HazeColor, hazeColor, xColor, DEFAULT_HAZE_COLOR);
DEFINE_PROPERTY_REF(PROP_HAZE_BLEND_OUT_COLOR, HazeBlendOutColor, hazeBlendOutColor, xColor, DEFAULT_HAZE_BLEND_OUT_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(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); DEFINE_PROPERTY_REF(PROP_HAZE_LIGHT_BLEND_ANGLE, HazeLightBlendAngle, hazeLightBlendAngle, float, DEFAULT_HAZE_LIGHT_BLEND_ANGLE);

View file

@ -338,22 +338,22 @@ float ZoneEntityItem::getHazeRange() const {
return _hazeRange; return _hazeRange;
} }
void ZoneEntityItem::setHazeBlendInColor(const xColor hazeBlendInColor) { void ZoneEntityItem::setHazeColor(const xColor hazeColor) {
_hazeBlendInColor = hazeBlendInColor; _hazeColor = hazeColor;
_hazePropertiesChanged = true; _hazePropertiesChanged = true;
} }
xColor ZoneEntityItem::getHazeBlendInColor() const { xColor ZoneEntityItem::getHazeColor() const {
return _hazeBlendInColor; return _hazeColor;
} }
void ZoneEntityItem::setHazeBlendOutColor(const xColor hazeBlendOutColor) { void ZoneEntityItem::setHazeGlareColor(const xColor hazeGlareColor) {
_hazeBlendOutColor = hazeBlendOutColor; _hazeGlareColor = hazeGlareColor;
_hazePropertiesChanged = true; _hazePropertiesChanged = true;
} }
xColor ZoneEntityItem::getHazeBlendOutColor()const { xColor ZoneEntityItem::getHazeGlareColor()const {
return _hazeBlendOutColor; return _hazeGlareColor;
} }
void ZoneEntityItem::setHazeEnableLightBlend(const bool hazeEnableLightBlend) { void ZoneEntityItem::setHazeEnableLightBlend(const bool hazeEnableLightBlend) {

View file

@ -75,10 +75,10 @@ public:
void setHazeRange(const float hazeRange); void setHazeRange(const float hazeRange);
float getHazeRange() const; float getHazeRange() const;
void setHazeBlendInColor(const xColor hazeBlendInColor); void setHazeColor(const xColor hazeColor);
xColor getHazeBlendInColor() const; xColor getHazeColor() const;
void setHazeBlendOutColor(const xColor hazeBlendOutColor); void setHazeGlareColor(const xColor hazeGlareColor);
xColor getHazeBlendOutColor() const; xColor getHazeGlareColor() const;
void setHazeEnableLightBlend(const bool hazeEnableLightBlend); void setHazeEnableLightBlend(const bool hazeEnableLightBlend);
bool getHazeEnableLightBlend() const; bool getHazeEnableLightBlend() const;
void setHazeLightBlendAngle(const float hazeLightBlendAngle); void setHazeLightBlendAngle(const float hazeLightBlendAngle);
@ -149,8 +149,8 @@ protected:
uint8_t _hazeMode{ (uint8_t)COMPONENT_MODE_INHERIT }; uint8_t _hazeMode{ (uint8_t)COMPONENT_MODE_INHERIT };
float _hazeRange{ HazePropertyGroup::DEFAULT_HAZE_RANGE }; float _hazeRange{ HazePropertyGroup::DEFAULT_HAZE_RANGE };
xColor _hazeBlendInColor{ HazePropertyGroup::DEFAULT_HAZE_BLEND_IN_COLOR }; xColor _hazeColor{ HazePropertyGroup::DEFAULT_HAZE_COLOR };
xColor _hazeBlendOutColor{ HazePropertyGroup::DEFAULT_HAZE_BLEND_OUT_COLOR }; xColor _hazeGlareColor{ HazePropertyGroup::DEFAULT_HAZE_GLARE_COLOR };
bool _hazeEnableLightBlend{ false }; bool _hazeEnableLightBlend{ false };
float _hazeLightBlendAngle{ HazePropertyGroup::DEFAULT_HAZE_LIGHT_BLEND_ANGLE }; float _hazeLightBlendAngle{ HazePropertyGroup::DEFAULT_HAZE_LIGHT_BLEND_ANGLE };

View file

@ -188,10 +188,10 @@ public:
void setHazeRange(float hazeRange) { _hazeRange = hazeRange; } void setHazeRange(float hazeRange) { _hazeRange = hazeRange; }
float getHazeRange() const { return _hazeRange; } float getHazeRange() const { return _hazeRange; }
void setHazeBlendInColor(const xColor hazeBlendInColor) { _hazeBlendInColor = hazeBlendInColor; } void setHazeColor(const xColor hazeColor) { _hazeColor = hazeColor; }
xColor getHazeBlendInColor() { return _hazeBlendInColor; } xColor getHazeColor() { return _hazeColor; }
void setHazeBlendOutColor(const xColor hazeBlendOutColor) { _hazeBlendOutColor = hazeBlendOutColor; } void setHazeGlareColor(const xColor hazeGlareColor) { _hazeGlareColor = hazeGlareColor; }
xColor getHazeBlendOutColor() const { return _hazeBlendOutColor; } xColor getHazeGlareColor() const { return _hazeGlareColor; }
void setHazeEnableLightBlend(bool hazeEnableLightBlend) { _hazeEnableLightBlend = hazeEnableLightBlend; } void setHazeEnableLightBlend(bool hazeEnableLightBlend) { _hazeEnableLightBlend = hazeEnableLightBlend; }
bool getHazeEnableLightBlend() const { return _hazeEnableLightBlend; } bool getHazeEnableLightBlend() const { return _hazeEnableLightBlend; }
void setHazeLightBlendAngle(float hazeLightBlendAngle) { _hazeLightBlendAngle = hazeLightBlendAngle; } void setHazeLightBlendAngle(float hazeLightBlendAngle) { _hazeLightBlendAngle = hazeLightBlendAngle; }
@ -220,8 +220,8 @@ protected:
uint8_t _hazeMode = (uint8_t)HAZE_OFF; uint8_t _hazeMode = (uint8_t)HAZE_OFF;
float _hazeRange; float _hazeRange;
xColor _hazeBlendInColor; xColor _hazeColor;
xColor _hazeBlendOutColor; xColor _hazeGlareColor;
bool _hazeEnableLightBlend; bool _hazeEnableLightBlend;
float _hazeLightBlendAngle; float _hazeLightBlendAngle;

View file

@ -155,17 +155,17 @@ void SceneScripting::Stage::setHazeRange(const float hazeRange) {
float SceneScripting::Stage::getHazeRange() const { float SceneScripting::Stage::getHazeRange() const {
return _skyStage->getHazeRange(); return _skyStage->getHazeRange();
} }
void SceneScripting::Stage::setHazeBlendInColor(const xColor hazeBlendInColor) { void SceneScripting::Stage::setHazeColor(const xColor hazeColor) {
_skyStage->setHazeBlendInColor(hazeBlendInColor); _skyStage->setHazeColor(hazeColor);
} }
xColor SceneScripting::Stage::getHazeBlendInColor() const { xColor SceneScripting::Stage::getHazeColor() const {
return _skyStage->getHazeBlendInColor(); return _skyStage->getHazeColor();
} }
void SceneScripting::Stage::setHazeBlendOutColor(const xColor hazeBlendOutColor) { void SceneScripting::Stage::setHazeGlareColor(const xColor hazeGlareColor) {
_skyStage->setHazeBlendOutColor(hazeBlendOutColor); _skyStage->setHazeGlareColor(hazeGlareColor);
} }
xColor SceneScripting::Stage::getHazeBlendOutColor() const { xColor SceneScripting::Stage::getHazeGlareColor() const {
return _skyStage->getHazeBlendOutColor(); return _skyStage->getHazeGlareColor();
} }
void SceneScripting::Stage::setHazeEnableLightBlend(const bool hazeEnableLightBlend) { void SceneScripting::Stage::setHazeEnableLightBlend(const bool hazeEnableLightBlend) {
_skyStage->setHazeEnableLightBlend(hazeEnableLightBlend); _skyStage->setHazeEnableLightBlend(hazeEnableLightBlend);

View file

@ -129,13 +129,13 @@ namespace SceneScripting {
void setHazeRange(float value); void setHazeRange(float value);
float getHazeRange() const; float getHazeRange() const;
Q_PROPERTY(xColor hazeBlendInColor READ getHazeBlendInColor WRITE setHazeBlendInColor) Q_PROPERTY(xColor hazeColor READ getHazeColor WRITE setHazeColor)
void setHazeBlendInColor(xColor value); void setHazeColor(xColor value);
xColor getHazeBlendInColor() const; xColor getHazeColor() const;
Q_PROPERTY(xColor hazeBlendOutColor READ getHazeBlendOutColor WRITE setHazeBlendOutColor) Q_PROPERTY(xColor hazeGlareColor READ getHazeGlareColor WRITE setHazeGlareColor)
void setHazeBlendOutColor(xColor value); void setHazeGlareColor(xColor value);
xColor getHazeBlendOutColor() const; xColor getHazeGlareColor() const;
Q_PROPERTY(bool hazeEnableLightBlend READ getHazeEnableLightBlend WRITE setHazeEnableLightBlend) Q_PROPERTY(bool hazeEnableLightBlend READ getHazeEnableLightBlend WRITE setHazeEnableLightBlend)
void setHazeEnableLightBlend(bool value); void setHazeEnableLightBlend(bool value);

View file

@ -678,14 +678,14 @@ function loaded() {
var elZoneHazeModeEnabled = document.getElementById("property-zone-haze-mode-enabled"); var elZoneHazeModeEnabled = document.getElementById("property-zone-haze-mode-enabled");
var elZoneHazeRange = document.getElementById("property-zone-haze-range"); var elZoneHazeRange = document.getElementById("property-zone-haze-range");
var elZoneHazeBlendInColor = document.getElementById("property-zone-haze-blend-in-color"); var elZoneHazeColor = document.getElementById("property-zone-haze-blend-in-color");
var elZoneHazeBlendInColorRed = document.getElementById("property-zone-haze-blend-in-color-red"); var elZoneHazeColorRed = document.getElementById("property-zone-haze-blend-in-color-red");
var elZoneHazeBlendInColorGreen = document.getElementById("property-zone-haze-blend-in-color-green"); var elZoneHazeColorGreen = document.getElementById("property-zone-haze-blend-in-color-green");
var elZoneHazeBlendInColorBlue = document.getElementById("property-zone-haze-blend-in-color-blue"); var elZoneHazeColorBlue = document.getElementById("property-zone-haze-blend-in-color-blue");
var elZoneHazeBlendOutColor = document.getElementById("property-zone-haze-blend-out-color"); var elZoneHazeGlareColor = document.getElementById("property-zone-haze-blend-out-color");
var elZoneHazeBlendOutColorRed = document.getElementById("property-zone-haze-blend-out-color-red"); var elZoneHazeGlareColorRed = document.getElementById("property-zone-haze-blend-out-color-red");
var elZoneHazeBlendOutColorGreen = document.getElementById("property-zone-haze-blend-out-color-green"); var elZoneHazeGlareColorGreen = document.getElementById("property-zone-haze-blend-out-color-green");
var elZoneHazeBlendOutColorBlue = document.getElementById("property-zone-haze-blend-out-color-blue"); var elZoneHazeGlareColorBlue = document.getElementById("property-zone-haze-blend-out-color-blue");
var elZoneHazeEnableLightBlend = document.getElementById("property-zone-haze-enable-light-blend"); var elZoneHazeEnableLightBlend = document.getElementById("property-zone-haze-enable-light-blend");
var elZoneHazeLightBlendAngle = document.getElementById("property-zone-haze-blend-angle"); var elZoneHazeLightBlendAngle = document.getElementById("property-zone-haze-blend-angle");
@ -1041,24 +1041,24 @@ function loaded() {
elZoneHazeModeEnabled.checked = (properties.hazeMode == 'enabled'); elZoneHazeModeEnabled.checked = (properties.hazeMode == 'enabled');
elZoneHazeRange.value = properties.haze.hazeRange.toFixed(0); elZoneHazeRange.value = properties.haze.hazeRange.toFixed(0);
elZoneHazeBlendInColor.style.backgroundColor = "rgb(" + elZoneHazeColor.style.backgroundColor = "rgb(" +
properties.haze.hazeBlendInColor.red + "," + properties.haze.hazeColor.red + "," +
properties.haze.hazeBlendInColor.green + "," + properties.haze.hazeColor.green + "," +
properties.haze.hazeBlendInColor.blue + ")"; properties.haze.hazeColor.blue + ")";
elZoneHazeBlendInColorRed.value = properties.haze.hazeBlendInColor.red; elZoneHazeColorRed.value = properties.haze.hazeColor.red;
elZoneHazeBlendInColorGreen.value = properties.haze.hazeBlendInColor.green; elZoneHazeColorGreen.value = properties.haze.hazeColor.green;
elZoneHazeBlendInColorBlue.value = properties.haze.hazeBlendInColor.blue; elZoneHazeColorBlue.value = properties.haze.hazeColor.blue;
elZoneHazeBackgroundBlend.value = properties.haze.hazeBackgroundBlend.toFixed(2); elZoneHazeBackgroundBlend.value = properties.haze.hazeBackgroundBlend.toFixed(2);
elZoneHazeBlendOutColor.style.backgroundColor = "rgb(" + elZoneHazeGlareColor.style.backgroundColor = "rgb(" +
properties.haze.hazeBlendOutColor.red + "," + properties.haze.hazeGlareColor.red + "," +
properties.haze.hazeBlendOutColor.green + "," + properties.haze.hazeGlareColor.green + "," +
properties.haze.hazeBlendOutColor.blue + ")"; properties.haze.hazeGlareColor.blue + ")";
elZoneHazeBlendOutColorRed.value = properties.haze.hazeBlendOutColor.red; elZoneHazeGlareColorRed.value = properties.haze.hazeGlareColor.red;
elZoneHazeBlendOutColorGreen.value = properties.haze.hazeBlendOutColor.green; elZoneHazeGlareColorGreen.value = properties.haze.hazeGlareColor.green;
elZoneHazeBlendOutColorBlue.value = properties.haze.hazeBlendOutColor.blue; elZoneHazeGlareColorBlue.value = properties.haze.hazeGlareColor.blue;
elZoneHazeEnableLightBlend.checked = properties.haze.hazeEnableLightBlend; elZoneHazeEnableLightBlend.checked = properties.haze.hazeEnableLightBlend;
elZoneHazeLightBlendAngle.value = properties.haze.hazeLightBlendAngle.toFixed(0); elZoneHazeLightBlendAngle.value = properties.haze.hazeLightBlendAngle.toFixed(0);
@ -1487,17 +1487,17 @@ function loaded() {
onSubmit: function(hsb, hex, rgb, el) { onSubmit: function(hsb, hex, rgb, el) {
$(el).css('background-color', '#' + hex); $(el).css('background-color', '#' + hex);
$(el).colpickHide(); $(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', var zoneHazeColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('haze', 'hazeColor',
elZoneHazeBlendInColorRed, elZoneHazeColorRed,
elZoneHazeBlendInColorGreen, elZoneHazeColorGreen,
elZoneHazeBlendInColorBlue); elZoneHazeColorBlue);
elZoneHazeBlendInColorRed.addEventListener('change', zoneHazeBlendInColorChangeFunction); elZoneHazeColorRed.addEventListener('change', zoneHazeColorChangeFunction);
elZoneHazeBlendInColorGreen.addEventListener('change', zoneHazeBlendInColorChangeFunction); elZoneHazeColorGreen.addEventListener('change', zoneHazeColorChangeFunction);
elZoneHazeBlendInColorBlue.addEventListener('change', zoneHazeBlendInColorChangeFunction); elZoneHazeColorBlue.addEventListener('change', zoneHazeColorChangeFunction);
colorPickers.push($('#property-zone-haze-blend-out-color').colpick({ colorPickers.push($('#property-zone-haze-blend-out-color').colpick({
colorScheme: 'dark', colorScheme: 'dark',
@ -1512,17 +1512,17 @@ function loaded() {
onSubmit: function(hsb, hex, rgb, el) { onSubmit: function(hsb, hex, rgb, el) {
$(el).css('background-color', '#' + hex); $(el).css('background-color', '#' + hex);
$(el).colpickHide(); $(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', var zoneHazeGlareColorChangeFunction = createEmitGroupColorPropertyUpdateFunction('haze', 'hazeGlareColor',
elZoneHazeBlendOutColorRed, elZoneHazeGlareColorRed,
elZoneHazeBlendOutColorGreen, elZoneHazeGlareColorGreen,
elZoneHazeBlendOutColorBlue); elZoneHazeGlareColorBlue);
elZoneHazeBlendOutColorRed.addEventListener('change', zoneHazeBlendOutColorChangeFunction); elZoneHazeGlareColorRed.addEventListener('change', zoneHazeGlareColorChangeFunction);
elZoneHazeBlendOutColorGreen.addEventListener('change', zoneHazeBlendOutColorChangeFunction); elZoneHazeGlareColorGreen.addEventListener('change', zoneHazeGlareColorChangeFunction);
elZoneHazeBlendOutColorBlue.addEventListener('change', zoneHazeBlendOutColorChangeFunction); elZoneHazeGlareColorBlue.addEventListener('change', zoneHazeGlareColorChangeFunction);
elZoneHazeEnableLightBlend.addEventListener('change', createEmitGroupCheckedPropertyUpdateFunction('haze', 'hazeEnableLightBlend')); elZoneHazeEnableLightBlend.addEventListener('change', createEmitGroupCheckedPropertyUpdateFunction('haze', 'hazeEnableLightBlend'));
elZoneHazeLightBlendAngle.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('haze', 'hazeLightBlendAngle')); elZoneHazeLightBlendAngle.addEventListener('change', createEmitGroupNumberPropertyUpdateFunction('haze', 'hazeLightBlendAngle'));