mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 18:55:01 +02:00
WIP - skybox inheritance
This commit is contained in:
parent
9636a0b450
commit
64644fc980
9 changed files with 112 additions and 12 deletions
|
@ -520,6 +520,10 @@ void ZoneEntityRenderer::setAmbientLightMode(ComponentMode mode) {
|
|||
_ambientLightMode = mode;
|
||||
}
|
||||
|
||||
void ZoneEntityRenderer::setSkyboxMode(ComponentMode mode) {
|
||||
_skyboxMode = mode;
|
||||
}
|
||||
|
||||
void ZoneEntityRenderer::setSkyboxColor(const glm::vec3& color) {
|
||||
editSkybox()->setColor(color);
|
||||
}
|
||||
|
|
|
@ -55,9 +55,12 @@ private:
|
|||
void setAmbientURL(const QString& ambientUrl);
|
||||
void setSkyboxURL(const QString& skyboxUrl);
|
||||
void setBackgroundMode(BackgroundMode mode);
|
||||
|
||||
void setHazeMode(ComponentMode mode);
|
||||
void setKeyLightMode(ComponentMode mode);
|
||||
void setAmbientLightMode(ComponentMode mode);
|
||||
void setSkyboxMode(ComponentMode mode);
|
||||
|
||||
void setSkyboxColor(const glm::vec3& color);
|
||||
void setProceduralUserData(const QString& userData);
|
||||
|
||||
|
@ -87,9 +90,11 @@ private:
|
|||
const model::HazePointer _haze{ std::make_shared<model::Haze>() };
|
||||
|
||||
BackgroundMode _backgroundMode{ BACKGROUND_MODE_INHERIT };
|
||||
|
||||
ComponentMode _hazeMode { COMPONENT_MODE_INHERIT };
|
||||
ComponentMode _keyLightMode { COMPONENT_MODE_INHERIT };
|
||||
ComponentMode _ambientLightMode { COMPONENT_MODE_INHERIT };
|
||||
ComponentMode _skyboxMode { COMPONENT_MODE_INHERIT };
|
||||
|
||||
indexed_container::Index _sunIndex{ LightStage::INVALID_INDEX };
|
||||
indexed_container::Index _shadowIndex{ LightStage::INVALID_INDEX };
|
||||
|
|
|
@ -302,6 +302,35 @@ void EntityItemProperties::setAmbientLightModeFromString(const QString& ambientL
|
|||
}
|
||||
}
|
||||
|
||||
QString EntityItemProperties::getSkyboxModeAsString() const {
|
||||
// return "enabled" if _skyboxMode is not valid
|
||||
if (_skyboxMode < COMPONENT_MODE_ITEM_COUNT) {
|
||||
return COMPONENT_MODES[_skyboxMode].second;
|
||||
} else {
|
||||
return COMPONENT_MODES[COMPONENT_MODE_ENABLED].second;
|
||||
}
|
||||
}
|
||||
|
||||
QString EntityItemProperties::getSkyboxModeString(uint32_t mode) {
|
||||
// return "enabled" if mode is not valid
|
||||
if (mode < COMPONENT_MODE_ITEM_COUNT) {
|
||||
return COMPONENT_MODES[mode].second;
|
||||
} else {
|
||||
return COMPONENT_MODES[COMPONENT_MODE_ENABLED].second;
|
||||
}
|
||||
}
|
||||
|
||||
void EntityItemProperties::setSkyboxModeFromString(const QString& skyboxMode) {
|
||||
auto result = std::find_if(COMPONENT_MODES.begin(), COMPONENT_MODES.end(), [&](const ComponentPair& pair) {
|
||||
return (pair.second == skyboxMode);
|
||||
});
|
||||
|
||||
if (result != COMPONENT_MODES.end()) {
|
||||
_skyboxMode = result->first;
|
||||
_skyboxModeChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
||||
EntityPropertyFlags changedProperties;
|
||||
|
||||
|
@ -392,6 +421,7 @@ EntityPropertyFlags EntityItemProperties::getChangedProperties() const {
|
|||
CHECK_PROPERTY_CHANGE(PROP_HAZE_MODE, hazeMode);
|
||||
CHECK_PROPERTY_CHANGE(PROP_KEY_LIGHT_MODE, keyLightMode);
|
||||
CHECK_PROPERTY_CHANGE(PROP_AMBIENT_LIGHT_MODE, ambientLightMode);
|
||||
CHECK_PROPERTY_CHANGE(PROP_SKYBOX_MODE, skyboxMode);
|
||||
|
||||
CHECK_PROPERTY_CHANGE(PROP_SOURCE_URL, sourceUrl);
|
||||
CHECK_PROPERTY_CHANGE(PROP_VOXEL_VOLUME_SIZE, voxelVolumeSize);
|
||||
|
@ -631,6 +661,7 @@ QScriptValue EntityItemProperties::copyToScriptValue(QScriptEngine* engine, bool
|
|||
|
||||
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_KEY_LIGHT_MODE, keyLightMode, getKeyLightModeAsString());
|
||||
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_AMBIENT_LIGHT_MODE, ambientLightMode, getAmbientLightModeAsString());
|
||||
COPY_PROPERTY_TO_QSCRIPTVALUE_GETTER(PROP_SKYBOX_MODE, skyboxMode, getSkyboxModeAsString());
|
||||
}
|
||||
|
||||
// Web only
|
||||
|
@ -820,6 +851,7 @@ void EntityItemProperties::copyFromScriptValue(const QScriptValue& object, bool
|
|||
COPY_PROPERTY_FROM_QSCRITPTVALUE_ENUM(hazeMode, HazeMode);
|
||||
COPY_PROPERTY_FROM_QSCRITPTVALUE_ENUM(keyLightMode, KeyLightMode);
|
||||
COPY_PROPERTY_FROM_QSCRITPTVALUE_ENUM(ambientLightMode, AmbientLightMode);
|
||||
COPY_PROPERTY_FROM_QSCRITPTVALUE_ENUM(skyboxMode, SkyboxMode);
|
||||
|
||||
COPY_PROPERTY_FROM_QSCRIPTVALUE(sourceUrl, QString, setSourceUrl);
|
||||
COPY_PROPERTY_FROM_QSCRIPTVALUE(voxelVolumeSize, glmVec3, setVoxelVolumeSize);
|
||||
|
@ -980,6 +1012,7 @@ void EntityItemProperties::merge(const EntityItemProperties& other) {
|
|||
COPY_PROPERTY_IF_CHANGED(hazeMode);
|
||||
COPY_PROPERTY_IF_CHANGED(keyLightMode);
|
||||
COPY_PROPERTY_IF_CHANGED(ambientLightMode);
|
||||
COPY_PROPERTY_IF_CHANGED(skyboxMode);
|
||||
|
||||
COPY_PROPERTY_IF_CHANGED(sourceUrl);
|
||||
COPY_PROPERTY_IF_CHANGED(voxelVolumeSize);
|
||||
|
@ -1255,6 +1288,7 @@ void EntityItemProperties::entityPropertyFlagsFromScriptValue(const QScriptValue
|
|||
|
||||
ADD_PROPERTY_TO_MAP(PROP_KEY_LIGHT_MODE, KeyLightMode, keyLightMode, uint32_t);
|
||||
ADD_PROPERTY_TO_MAP(PROP_AMBIENT_LIGHT_MODE, AmbientLightMode, ambientLightMode, uint32_t);
|
||||
ADD_PROPERTY_TO_MAP(PROP_SKYBOX_MODE, SkyboxMode, skyboxMode, uint32_t);
|
||||
|
||||
ADD_PROPERTY_TO_MAP(PROP_DPI, DPI, dpi, uint16_t);
|
||||
|
||||
|
@ -1506,6 +1540,7 @@ OctreeElement::AppendState EntityItemProperties::encodeEntityEditPacket(PacketTy
|
|||
|
||||
APPEND_ENTITY_PROPERTY(PROP_KEY_LIGHT_MODE, (uint32_t)properties.getKeyLightMode());
|
||||
APPEND_ENTITY_PROPERTY(PROP_AMBIENT_LIGHT_MODE, (uint32_t)properties.getAmbientLightMode());
|
||||
APPEND_ENTITY_PROPERTY(PROP_SKYBOX_MODE, (uint32_t)properties.getSkyboxMode());
|
||||
}
|
||||
|
||||
if (properties.getType() == EntityTypes::PolyVox) {
|
||||
|
@ -1860,7 +1895,8 @@ bool EntityItemProperties::decodeEntityEditPacket(const unsigned char* data, int
|
|||
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_KEY_LIGHT_MODE, uint32_t, setKeyLightMode);
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_AMBIENT_LIGHT_MODE, uint32_t, setAmbientLightMode);
|
||||
}
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_SKYBOX_MODE, uint32_t, setSkyboxMode);
|
||||
}
|
||||
|
||||
if (properties.getType() == EntityTypes::PolyVox) {
|
||||
READ_ENTITY_PROPERTY_TO_PROPERTIES(PROP_VOXEL_VOLUME_SIZE, glm::vec3, setVoxelVolumeSize);
|
||||
|
@ -2449,6 +2485,10 @@ QList<QString> EntityItemProperties::listChangedProperties() {
|
|||
out += "ambientLightMode";
|
||||
}
|
||||
|
||||
if (skyboxModeChanged()) {
|
||||
out += "skyboxMode";
|
||||
}
|
||||
|
||||
if (voxelVolumeSizeChanged()) {
|
||||
out += "voxelVolumeSize";
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ public:
|
|||
DEFINE_PROPERTY_REF_ENUM(PROP_HAZE_MODE, HazeMode, hazeMode, uint32_t, (uint32_t)COMPONENT_MODE_INHERIT);
|
||||
DEFINE_PROPERTY_REF_ENUM(PROP_KEY_LIGHT_MODE, KeyLightMode, keyLightMode, uint32_t, (uint32_t)COMPONENT_MODE_INHERIT);
|
||||
DEFINE_PROPERTY_REF_ENUM(PROP_AMBIENT_LIGHT_MODE, AmbientLightMode, ambientLightMode, uint32_t, (uint32_t)COMPONENT_MODE_INHERIT);
|
||||
DEFINE_PROPERTY_REF_ENUM(PROP_SKYBOX_MODE, SkyboxMode, skyboxMode, uint32_t, (uint32_t)COMPONENT_MODE_INHERIT);
|
||||
|
||||
DEFINE_PROPERTY_GROUP(Skybox, skybox, SkyboxPropertyGroup);
|
||||
DEFINE_PROPERTY_GROUP(Haze, haze, HazePropertyGroup);
|
||||
|
@ -253,6 +254,7 @@ public:
|
|||
static QString getHazeModeString(uint32_t mode);
|
||||
static QString getKeyLightModeString(uint32_t mode);
|
||||
static QString getAmbientLightModeString(uint32_t mode);
|
||||
static QString getSkyboxModeString(uint32_t mode);
|
||||
|
||||
public:
|
||||
float getMaxDimension() const { return glm::compMax(_dimensions); }
|
||||
|
@ -481,9 +483,12 @@ inline QDebug operator<<(QDebug debug, const EntityItemProperties& properties) {
|
|||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, StaticCertificateVersion, staticCertificateVersion, "");
|
||||
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, BackgroundMode, backgroundMode, "");
|
||||
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, HazeMode, hazeMode, "");
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, KeyLightMode, keyLightMode, "");
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, AmbientLightMode, ambientLightMode, "");
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, SkyboxMode, skyboxMode, "");
|
||||
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, VoxelVolumeSize, voxelVolumeSize, "");
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, VoxelData, voxelData, "");
|
||||
DEBUG_PROPERTY_IF_CHANGED(debug, properties, VoxelSurfaceStyle, voxelSurfaceStyle, "");
|
||||
|
|
|
@ -222,6 +222,7 @@ enum EntityPropertyList {
|
|||
|
||||
PROP_KEY_LIGHT_MODE,
|
||||
PROP_AMBIENT_LIGHT_MODE,
|
||||
PROP_SKYBOX_MODE,
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// ATTENTION: add new properties to end of list just ABOVE this line
|
||||
|
|
|
@ -78,6 +78,7 @@ EntityItemProperties ZoneEntityItem::getProperties(EntityPropertyFlags desiredPr
|
|||
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(keyLightMode, getKeyLightMode);
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(ambientLightMode, getAmbientLightMode);
|
||||
COPY_ENTITY_PROPERTY_TO_PROPERTIES(skyboxMode, getSkyboxMode);
|
||||
|
||||
return properties;
|
||||
}
|
||||
|
@ -131,6 +132,7 @@ bool ZoneEntityItem::setSubClassProperties(const EntityItemProperties& propertie
|
|||
|
||||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(keyLightMode, setKeyLightMode);
|
||||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(ambientLightMode, setAmbientLightMode);
|
||||
SET_ENTITY_PROPERTY_FROM_PROPERTIES(skyboxMode, setSkyboxMode);
|
||||
|
||||
somethingChanged = somethingChanged || _keyLightPropertiesChanged || _ambientLightPropertiesChanged ||
|
||||
_stagePropertiesChanged || _skyboxPropertiesChanged || _hazePropertiesChanged;
|
||||
|
@ -199,6 +201,7 @@ int ZoneEntityItem::readEntitySubclassDataFromBuffer(const unsigned char* data,
|
|||
|
||||
READ_ENTITY_PROPERTY(PROP_KEY_LIGHT_MODE, uint32_t, setKeyLightMode);
|
||||
READ_ENTITY_PROPERTY(PROP_AMBIENT_LIGHT_MODE, uint32_t, setAmbientLightMode);
|
||||
READ_ENTITY_PROPERTY(PROP_SKYBOX_MODE, uint32_t, setSkyboxMode);
|
||||
|
||||
return bytesRead;
|
||||
}
|
||||
|
@ -235,6 +238,7 @@ EntityPropertyFlags ZoneEntityItem::getEntityProperties(EncodeBitstreamParams& p
|
|||
|
||||
requestedProperties += PROP_KEY_LIGHT_MODE;
|
||||
requestedProperties += PROP_AMBIENT_LIGHT_MODE;
|
||||
requestedProperties += PROP_SKYBOX_MODE;
|
||||
|
||||
return requestedProperties;
|
||||
}
|
||||
|
@ -276,6 +280,7 @@ void ZoneEntityItem::appendSubclassData(OctreePacketData* packetData, EncodeBits
|
|||
|
||||
APPEND_ENTITY_PROPERTY(PROP_KEY_LIGHT_MODE, (uint32_t)getKeyLightMode());
|
||||
APPEND_ENTITY_PROPERTY(PROP_AMBIENT_LIGHT_MODE, (uint32_t)getAmbientLightMode());
|
||||
APPEND_ENTITY_PROPERTY(PROP_SKYBOX_MODE, (uint32_t)getSkyboxMode());
|
||||
}
|
||||
|
||||
void ZoneEntityItem::debugDump() const {
|
||||
|
@ -288,6 +293,7 @@ void ZoneEntityItem::debugDump() const {
|
|||
qCDebug(entities) << " _hazeMode:" << EntityItemProperties::getHazeModeString(_hazeMode);
|
||||
qCDebug(entities) << " _keyLightMode:" << EntityItemProperties::getKeyLightModeString(_keyLightMode);
|
||||
qCDebug(entities) << " _ambientLightMode:" << EntityItemProperties::getAmbientLightModeString(_ambientLightMode);
|
||||
qCDebug(entities) << " _skyboxMode:" << EntityItemProperties::getSkyboxModeString(_skyboxMode);
|
||||
|
||||
_keyLightProperties.debugDump();
|
||||
_ambientLightProperties.debugDump();
|
||||
|
@ -396,3 +402,14 @@ void ZoneEntityItem::setAmbientLightMode(const uint32_t value) {
|
|||
uint32_t ZoneEntityItem::getAmbientLightMode() const {
|
||||
return _ambientLightMode;
|
||||
}
|
||||
|
||||
void ZoneEntityItem::setSkyboxMode(const uint32_t value) {
|
||||
if (value < COMPONENT_MODE_ITEM_COUNT) {
|
||||
_skyboxMode = value;
|
||||
_skyboxPropertiesChanged = true;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t ZoneEntityItem::getSkyboxMode() const {
|
||||
return _skyboxMode;
|
||||
}
|
||||
|
|
|
@ -81,6 +81,9 @@ public:
|
|||
void setAmbientLightMode(uint32_t value);
|
||||
uint32_t getAmbientLightMode() const;
|
||||
|
||||
void setSkyboxMode(uint32_t value);
|
||||
uint32_t getSkyboxMode() const;
|
||||
|
||||
SkyboxPropertyGroup getSkyboxProperties() const { return resultWithReadLock<SkyboxPropertyGroup>([&] { return _skyboxProperties; }); }
|
||||
|
||||
const HazePropertyGroup& getHazeProperties() const { return _hazeProperties; }
|
||||
|
@ -132,6 +135,7 @@ protected:
|
|||
uint32_t _hazeMode { COMPONENT_MODE_INHERIT };
|
||||
uint32_t _keyLightMode { COMPONENT_MODE_INHERIT };
|
||||
uint32_t _ambientLightMode { COMPONENT_MODE_INHERIT };
|
||||
uint32_t _skyboxMode { COMPONENT_MODE_INHERIT };
|
||||
|
||||
SkyboxPropertyGroup _skyboxProperties;
|
||||
HazePropertyGroup _hazeProperties;
|
||||
|
|
|
@ -540,6 +540,11 @@
|
|||
<legend class="sub-section-header zone-group zone-section background-section">
|
||||
Background
|
||||
</legend>
|
||||
<form>
|
||||
<input type="radio" name="skyboxMode" value="inherit" id="property-zone-skybox-mode-inherit" checked> Inherit
|
||||
<input type="radio" name="skyboxMode" value="disabled" id="property-zone-skybox-mode-disabled"> Off
|
||||
<input type="radio" name="skyboxMode" value="enabled" id="property-zone-skybox-mode-enabled"> On
|
||||
</form>
|
||||
<div class="zone-group zone-section background-section property dropdown">
|
||||
<label>Background mode</label>
|
||||
<select name="SelectBackgroundMode" id="property-zone-background-mode">
|
||||
|
@ -598,9 +603,9 @@
|
|||
Haze
|
||||
</legend>
|
||||
<form>
|
||||
<input type="radio" name="hazeMode" value="inherit" id="property-zone-haze-mode-inherit" checked> Inherit
|
||||
<input type="radio" name="hazeMode" value="disabled" id="property-zone-haze-mode-disabled"> Off
|
||||
<input type="radio" name="hazeMode" value="enabled" id="property-zone-haze-mode-enabled"> On
|
||||
<input type="radio" name="hazeMode" value="inherit" id="property-zone-haze-mode-inherit" checked> Inherit
|
||||
<input type="radio" name="hazeMode" value="disabled" id="property-zone-haze-mode-disabled"> Off
|
||||
<input type="radio" name="hazeMode" value="enabled" id="property-zone-haze-mode-enabled"> On
|
||||
</form>
|
||||
<fieldset class="zone-group zone-section haze-section property gen fstuple">
|
||||
<div class="tuple">
|
||||
|
|
|
@ -653,12 +653,17 @@ function loaded() {
|
|||
var elZoneKeyLightDirectionX = document.getElementById("property-zone-key-light-direction-x");
|
||||
var elZoneKeyLightDirectionY = document.getElementById("property-zone-key-light-direction-y");
|
||||
|
||||
// Skybox
|
||||
var elZoneSkyboxModeInherit = document.getElementById("property-zone-skybox-mode-inherit");
|
||||
var elZoneSkyboxModeDisabled = document.getElementById("property-zone-skybox-mode-disabled");
|
||||
var elZoneSkyboxModeEnabled = document.getElementById("property-zone-skybox-mode-enabled");
|
||||
|
||||
// Ambient light
|
||||
var elCopySkyboxURLToAmbientURL = document.getElementById("copy-skybox-url-to-ambient-url");
|
||||
|
||||
var elZoneAmbientLightModeInherit = document.getElementById("property-zone-ambient-light-mode-inherit");
|
||||
var elZoneAmbientLightModeInherit = document.getElementById("property-zone-ambient-light-mode-inherit");
|
||||
var elZoneAmbientLightModeDisabled = document.getElementById("property-zone-ambient-light-mode-disabled");
|
||||
var elZoneAmbientLightModeEnabled = document.getElementById("property-zone-ambient-light-mode-enabled");
|
||||
var elZoneAmbientLightModeEnabled = document.getElementById("property-zone-ambient-light-mode-enabled");
|
||||
|
||||
var elZoneAmbientLightIntensity = document.getElementById("property-zone-key-ambient-intensity");
|
||||
var elZoneAmbientLightURL = document.getElementById("property-zone-key-ambient-url");
|
||||
|
@ -1018,9 +1023,9 @@ function loaded() {
|
|||
|
||||
} else if (properties.type === "Zone") {
|
||||
// Key light
|
||||
elZoneKeyLightModeInherit.checked = (properties.keyLightMode === 'inherit');
|
||||
elZoneKeyLightModeInherit.checked = (properties.keyLightMode === 'inherit');
|
||||
elZoneKeyLightModeDisabled.checked = (properties.keyLightMode === 'disabled');
|
||||
elZoneKeyLightModeEnabled.checked = (properties.keyLightMode === 'enabled');
|
||||
elZoneKeyLightModeEnabled.checked = (properties.keyLightMode === 'enabled');
|
||||
|
||||
elZoneStageSunModelEnabled.checked = properties.stage.sunModelEnabled;
|
||||
elZoneKeyLightColor.style.backgroundColor = "rgb(" + properties.keyLight.color.red + "," +
|
||||
|
@ -1032,18 +1037,23 @@ function loaded() {
|
|||
elZoneKeyLightDirectionX.value = properties.keyLight.direction.x.toFixed(2);
|
||||
elZoneKeyLightDirectionY.value = properties.keyLight.direction.y.toFixed(2);
|
||||
|
||||
// Skybox
|
||||
elZoneSkyboxModeInherit.checked = (properties.skyboxMode === 'inherit');
|
||||
elZoneSkyboxModeDisabled.checked = (properties.skyboxMode === 'disabled');
|
||||
elZoneSkyboxModeEnabled.checked = (properties.skyboxMode === 'enabled');
|
||||
|
||||
// Ambient light
|
||||
elZoneAmbientLightModeInherit.checked = (properties.ambientLightMode === 'inherit');
|
||||
elZoneAmbientLightModeInherit.checked = (properties.ambientLightMode === 'inherit');
|
||||
elZoneAmbientLightModeDisabled.checked = (properties.ambientLightMode === 'disabled');
|
||||
elZoneAmbientLightModeEnabled.checked = (properties.ambientLightMode === 'enabled');
|
||||
elZoneAmbientLightModeEnabled.checked = (properties.ambientLightMode === 'enabled');
|
||||
|
||||
elZoneAmbientLightIntensity.value = properties.ambientLight.ambientIntensity.toFixed(2);
|
||||
elZoneAmbientLightURL.value = properties.ambientLight.ambientURL;
|
||||
|
||||
// Haze
|
||||
elZoneHazeModeInherit.checked = (properties.hazeMode === 'inherit');
|
||||
elZoneHazeModeInherit.checked = (properties.hazeMode === 'inherit');
|
||||
elZoneHazeModeDisabled.checked = (properties.hazeMode === 'disabled');
|
||||
elZoneHazeModeEnabled.checked = (properties.hazeMode === 'enabled');
|
||||
elZoneHazeModeEnabled.checked = (properties.hazeMode === 'enabled');
|
||||
|
||||
elZoneHazeRange.value = properties.haze.hazeRange.toFixed(0);
|
||||
elZoneHazeColor.style.backgroundColor = "rgb(" +
|
||||
|
@ -1468,6 +1478,15 @@ function loaded() {
|
|||
elZoneKeyLightDirectionX.addEventListener('change', zoneKeyLightDirectionChangeFunction);
|
||||
elZoneKeyLightDirectionY.addEventListener('change', zoneKeyLightDirectionChangeFunction);
|
||||
|
||||
// Skybox
|
||||
|
||||
var skyboxModeChanged = createZoneComponentModeChangedFunction('skyboxMode',
|
||||
elZoneSkyboxModeInherit, elZoneSkyboxModeDisabled, elZoneSkyboxModeEnabled);
|
||||
|
||||
elZoneSkyboxModeInherit.addEventListener('change', skyboxModeChanged);
|
||||
elZoneSkyboxModeDisabled.addEventListener('change', skyboxModeChanged);
|
||||
elZoneSkyboxModeEnabled.addEventListener('change', skyboxModeChanged);
|
||||
|
||||
// Ambient light
|
||||
elCopySkyboxURLToAmbientURL.addEventListener("click", function () {
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
|
|
Loading…
Reference in a new issue