mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 00:34:22 +02:00
Zone inheritance ready for testing.
This commit is contained in:
parent
0e76d481a1
commit
87e896ab20
4 changed files with 9 additions and 11 deletions
|
@ -184,8 +184,7 @@ void ZoneEntityRenderer::doRender(RenderArgs* args) {
|
|||
// Just turned off, store previous value before changing
|
||||
_skyboxOnIndex = _backgroundIndex;
|
||||
_backgroundIndex = _stage->getSunOffLight();
|
||||
}
|
||||
else if (_skyboxMode == COMPONENT_MODE_ENABLED && _skyboxOnIndex != NO_STORED_VALUE) {
|
||||
} else if (_skyboxMode == COMPONENT_MODE_ENABLED && _skyboxOnIndex != NO_STORED_VALUE) {
|
||||
// Just turned on, restore previous value before clearing stored value
|
||||
_backgroundIndex = _skyboxOnIndex;
|
||||
_skyboxOnIndex = NO_STORED_VALUE;
|
||||
|
@ -200,14 +199,13 @@ void ZoneEntityRenderer::doRender(RenderArgs* args) {
|
|||
// Just turned off, store previous value before changing
|
||||
_ambientOnIndex = _ambientIndex;
|
||||
_ambientIndex = _stage->getAmbientOffLight();
|
||||
}
|
||||
else if (_ambientLightMode == COMPONENT_MODE_ENABLED && _ambientOnIndex != NO_STORED_VALUE) {
|
||||
} else if (_ambientLightMode == COMPONENT_MODE_ENABLED && _ambientOnIndex != NO_STORED_VALUE) {
|
||||
// Just turned on, restore previous value before clearing stored value
|
||||
_ambientIndex = _ambientOnIndex;
|
||||
_ambientOnIndex = NO_STORED_VALUE;
|
||||
}
|
||||
|
||||
if (_ambientLightMode != COMPONENT_MODE_INHERIT && (_validAmbientTexture || _validSkyboxTexture)) {
|
||||
if (_ambientLightMode != COMPONENT_MODE_INHERIT && (_validAmbientTexture)) {
|
||||
_stage->_currentFrame.pushAmbientLight(_ambientIndex);
|
||||
}
|
||||
|
||||
|
|
|
@ -2089,8 +2089,6 @@ var PropertiesTool = function (opts) {
|
|||
Entities.reloadServerScripts(selectionManager.selections[i]);
|
||||
}
|
||||
}
|
||||
} else if (data.action === "copySkyboxURLToAmbientURL") {
|
||||
Window.notifyEditError("I DON'T KNOW HOW :(");
|
||||
}
|
||||
} else if (data.type === "propertiesPageReady") {
|
||||
updateSelections(true);
|
||||
|
|
|
@ -564,8 +564,11 @@
|
|||
</div>
|
||||
</fieldset>
|
||||
<div class="zone-group zone-section skybox-section property url ">
|
||||
<br>
|
||||
<label for="property-zone-skybox-url" width="80">Skybox URL</label>
|
||||
<input type="text" id="property-zone-skybox-url">
|
||||
<br>
|
||||
<br>
|
||||
<input type="button" id="copy-skybox-url-to-ambient-url" value="Copy URL to Ambient">
|
||||
</div>
|
||||
</fieldset>
|
||||
|
|
|
@ -1492,10 +1492,9 @@ function loaded() {
|
|||
|
||||
// Ambient light
|
||||
elCopySkyboxURLToAmbientURL.addEventListener("click", function () {
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: "action",
|
||||
action: "copySkyboxURLToAmbientURL"
|
||||
}));
|
||||
document.getElementById("property-zone-key-ambient-url").value = properties.skybox.url;
|
||||
properties.ambientLight.ambientURL = properties.skybox.url;
|
||||
updateProperties(properties);
|
||||
});
|
||||
|
||||
var ambientLightModeChanged = createZoneComponentModeChangedFunction('ambientLightMode',
|
||||
|
|
Loading…
Reference in a new issue