mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:44:01 +02:00
first cut at adding new zone properties to edit tools
This commit is contained in:
parent
12c26f9c3c
commit
d9f17d010c
1 changed files with 119 additions and 0 deletions
|
@ -205,6 +205,24 @@
|
|||
var elZoneStageDay = document.getElementById("property-zone-stage-day");
|
||||
var elZoneStageHour = document.getElementById("property-zone-stage-hour");
|
||||
|
||||
var elZoneBackgroundMode = document.getElementById("property-zone-background-mode");
|
||||
|
||||
var elZoneSkyboxColorRed = document.getElementById("property-zone-skybox-color-red");
|
||||
var elZoneSkyboxColorGreen = document.getElementById("property-zone-skybox-color-green");
|
||||
var elZoneSkyboxColorBlue = document.getElementById("property-zone-skybox-color-blue");
|
||||
var elZoneSkyboxURL = document.getElementById("property-zone-skybox-url");
|
||||
|
||||
var elZoneAtmosphereCenterX = document.getElementById("property-zone-atmosphere-center-x");
|
||||
var elZoneAtmosphereCenterY = document.getElementById("property-zone-atmosphere-center-y");
|
||||
var elZoneAtmosphereCenterZ = document.getElementById("property-zone-atmosphere-center-z");
|
||||
var elZoneAtmosphereInnerRadius = document.getElementById("property-zone-atmosphere-inner-radius");
|
||||
var elZoneAtmosphereOuterRadius = document.getElementById("property-zone-atmosphere-outer-radius");
|
||||
var elZoneAtmosphereMieScattering = document.getElementById("property-zone-atmosphere-mie-scattering");
|
||||
var elZoneAtmosphereRayleighScattering = document.getElementById("property-zone-atmosphere-rayleigh-scattering");
|
||||
var elZoneAtmosphereScatteringWavelengthsX = document.getElementById("property-zone-atmosphere-scattering-wavelengths-x");
|
||||
var elZoneAtmosphereScatteringWavelengthsY = document.getElementById("property-zone-atmosphere-scattering-wavelengths-y");
|
||||
var elZoneAtmosphereScatteringWavelengthsZ = document.getElementById("property-zone-atmosphere-scattering-wavelengths-z");
|
||||
|
||||
if (window.EventBridge !== undefined) {
|
||||
EventBridge.scriptEventReceived.connect(function(data) {
|
||||
data = JSON.parse(data);
|
||||
|
@ -386,6 +404,26 @@
|
|||
elZoneStageHour.value = properties.stageHour;
|
||||
elShapeType.value = properties.shapeType;
|
||||
elCompoundShapeURL.value = properties.compoundShapeURL;
|
||||
|
||||
elZoneBackgroundMode.value = properties.backgroundMode;
|
||||
|
||||
elZoneSkyboxColorRed.value = properties.skybox.color.red;
|
||||
elZoneSkyboxColorGreen.value = properties.skybox.color.green;
|
||||
elZoneSkyboxColorBlue.value = properties.skybox.color.blue;
|
||||
elZoneSkyboxURL.value = properties.skybox.url;
|
||||
|
||||
elZoneAtmosphereCenterX.value = properties.atmosphere.center.x;
|
||||
elZoneAtmosphereCenterY.value = properties.atmosphere.center.y;
|
||||
elZoneAtmosphereCenterZ.value = properties.atmosphere.center.z;
|
||||
elZoneAtmosphereInnerRadius.value = properties.atmosphere.innerRadius;
|
||||
elZoneAtmosphereOuterRadius.value = properties.atmosphere.outerRadius;
|
||||
elZoneAtmosphereMieScattering.value = properties.atmosphere.mieScattering;
|
||||
elZoneAtmosphereRayleighScattering.value = properties.atmosphere.rayleighScattering;
|
||||
elZoneAtmosphereScatteringWavelengthsX.value = properties.atmosphere.scatteringWavelengths.x;
|
||||
elZoneAtmosphereScatteringWavelengthsY.value = properties.atmosphere.scatteringWavelengths.y;
|
||||
elZoneAtmosphereScatteringWavelengthsZ.value = properties.atmosphere.scatteringWavelengths.z;
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (selected) {
|
||||
|
@ -521,6 +559,21 @@
|
|||
elZoneStageDay.addEventListener('change', createEmitNumberPropertyUpdateFunction('stageDay'));
|
||||
elZoneStageHour.addEventListener('change', createEmitNumberPropertyUpdateFunction('stageHour'));
|
||||
|
||||
elZoneBackgroundMode.addEventListener('change', createEmitTextPropertyUpdateFunction('backgroundMode'));
|
||||
var zoneSkyboxColorChangeFunction = createEmitColorPropertyUpdateFunction(
|
||||
'skybox.color', elZoneSkyboxColorRed, elZoneSkyboxColorGreen, elZoneSkyboxColorBlue);
|
||||
elZoneSkyboxURL.addEventListener('change', createEmitTextPropertyUpdateFunction('skybox.url'));
|
||||
|
||||
var zoneAtmosphereCenterChangeFunction = createEmitVec3PropertyUpdateFunction(
|
||||
'atmosphere.center', elZoneAtmosphereCenterX, elZoneAtmosphereCenterY, elZoneAtmosphereCenterZ);
|
||||
elZoneAtmosphereInnerRadius.addEventListener('change', createEmitNumberPropertyUpdateFunction('atmosphere.innerRadius'));
|
||||
elZoneAtmosphereOuterRadius.addEventListener('change', createEmitNumberPropertyUpdateFunction('atmosphere.outerRadius'));
|
||||
elZoneAtmosphereMieScattering.addEventListener('change', createEmitNumberPropertyUpdateFunction('atmosphere.mieScattering'));
|
||||
elZoneAtmosphereRayleighScattering.addEventListener('change', createEmitNumberPropertyUpdateFunction('atmosphere.rayleighScattering'));
|
||||
var zoneAtmosphereCenterChangeFunction = createEmitVec3PropertyUpdateFunction(
|
||||
'atmosphere.scatteringWavelengths', elZoneAtmosphereScatteringWavelengthsX,
|
||||
elZoneAtmosphereScatteringWavelengthsY, elZoneAtmosphereScatteringWavelengthsZ);
|
||||
|
||||
elMoveSelectionToGrid.addEventListener("click", function() {
|
||||
EventBridge.emitWebEvent(JSON.stringify({
|
||||
type: "action",
|
||||
|
@ -958,6 +1011,72 @@
|
|||
<input class="coord" type='number' id="property-zone-stage-hour" min="0" max="24" step="0.5"></input>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="zone-section property">
|
||||
<div class="label">Background Mode</div>
|
||||
<div class="value">
|
||||
<select name="SelectBackgroundMode" id="property-zone-background-mode" name="SelectBackgroundMode">
|
||||
<option value='inherit'>Nothing</option>
|
||||
<option value='skybox'>Skybox</option>
|
||||
<option value='atmosphere'>Atmosphere</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Skybox Color</div>
|
||||
<div class="value">
|
||||
<div class="input-area">R <input class="coord" type='number' id="property-zone-skybox-color-red"></input></div>
|
||||
<div class="input-area">G <input class="coord" type='number' id="property-zone-skybox-color-green"></input></div>
|
||||
<div class="input-area">B <input class="coord" type='number' id="property-zone-skybox-color-blue"></input></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Skybox URL</div>
|
||||
<div class="value">
|
||||
<input type="text" id="property-zone-skybox-url" class="url"></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Atmosphere Center</div>
|
||||
<div class="value">
|
||||
<div class="input-area">X <br><input class="coord" type='number' id="property-zone-atmosphere-center-x"></input></div>
|
||||
<div class="input-area">Y <br><input class="coord" type='number' id="property-zone-atmosphere-center-y"></input></div>
|
||||
<div class="input-area">Z <br><input class="coord" type='number' id="property-zone-atmosphere-center-z"></input></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Atmosphere Inner Radius</div>
|
||||
<div class="value">
|
||||
<input class="coord" type='number' id="property-zone-atmosphere-inner-radius" step="1"></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Atmosphere Outer Radius</div>
|
||||
<div class="value">
|
||||
<input class="coord" type='number' id="property-zone-atmosphere-outer-radius" step="1"></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Atmosphere Mie Scattering</div>
|
||||
<div class="value">
|
||||
<input class="coord" type='number' id="property-zone-atmosphere-mie-scattering" min="0" max="0.5" step="0.01"></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Atmosphere Rayleigh Scattering</div>
|
||||
<div class="value">
|
||||
<input class="coord" type='number' id="property-zone-atmosphere-rayleigh-scattering" min="0" max="0.5" step="0.01"></input>
|
||||
</div>
|
||||
</div>
|
||||
<div class="zone-section property">
|
||||
<div class="label">Atmosphere Scattering Wavelenghts</div>
|
||||
<div class="value">
|
||||
<div class="input-area">X <br><input class="coord" type='number' id="property-zone-atmosphere-scattering-wavelengths-x" min="0" max="1" step="0.01"></input></div>
|
||||
<div class="input-area">Y <br><input class="coord" type='number' id="property-zone-atmosphere-scattering-wavelengths-y" min="0" max="1" step="0.01"></input></div>
|
||||
<div class="input-area">Z <br><input class="coord" type='number' id="property-zone-atmosphere-scattering-wavelengths-z" min="0" max="1" step="0.01"></input></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue