mirror of
https://github.com/overte-org/overte.git
synced 2025-08-11 01:23:17 +02:00
Update editEntities to use new light properties
This commit is contained in:
parent
a7f84bcd30
commit
20f3d23ae7
1 changed files with 18 additions and 18 deletions
|
@ -128,11 +128,11 @@
|
||||||
|
|
||||||
var elLightSections = document.querySelectorAll(".light-section");
|
var elLightSections = document.querySelectorAll(".light-section");
|
||||||
var elLightSpotLight = document.getElementById("property-light-spot-light");
|
var elLightSpotLight = document.getElementById("property-light-spot-light");
|
||||||
var elLightDiffuseRed = document.getElementById("property-light-diffuse-red");
|
var elLightColorRed = document.getElementById("property-light-color-red");
|
||||||
var elLightDiffuseGreen = document.getElementById("property-light-diffuse-green");
|
var elLightColorGreen = document.getElementById("property-light-color-green");
|
||||||
var elLightDiffuseBlue = document.getElementById("property-light-diffuse-blue");
|
var elLightColorBlue = document.getElementById("property-light-color-blue");
|
||||||
|
|
||||||
var elLightConstantAttenuation = document.getElementById("property-light-constant-attenuation");
|
var elLightIntensity = document.getElementById("property-light-intensity");
|
||||||
var elLightExponent = document.getElementById("property-light-exponent");
|
var elLightExponent = document.getElementById("property-light-exponent");
|
||||||
var elLightCutoff = document.getElementById("property-light-cutoff");
|
var elLightCutoff = document.getElementById("property-light-cutoff");
|
||||||
|
|
||||||
|
@ -305,11 +305,11 @@
|
||||||
elLightSections[i].style.display = 'block';
|
elLightSections[i].style.display = 'block';
|
||||||
}
|
}
|
||||||
|
|
||||||
elLightDiffuseRed.value = properties.diffuseColor.red;
|
elLightColorRed.value = properties.color.red;
|
||||||
elLightDiffuseGreen.value = properties.diffuseColor.green;
|
elLightColorGreen.value = properties.color.green;
|
||||||
elLightDiffuseBlue.value = properties.diffuseColor.blue;
|
elLightColorBlue.value = properties.color.blue;
|
||||||
|
|
||||||
elLightConstantAttenuation.value = properties.constantAttenuation;
|
elLightIntensity.value = properties.intensity;
|
||||||
elLightExponent.value = properties.exponent;
|
elLightExponent.value = properties.exponent;
|
||||||
elLightCutoff.value = properties.cutoff;
|
elLightCutoff.value = properties.cutoff;
|
||||||
}
|
}
|
||||||
|
@ -380,13 +380,13 @@
|
||||||
|
|
||||||
elLightSpotLight.addEventListener('change', createEmitCheckedPropertyUpdateFunction('isSpotlight'));
|
elLightSpotLight.addEventListener('change', createEmitCheckedPropertyUpdateFunction('isSpotlight'));
|
||||||
|
|
||||||
var lightDiffuseChangeFunction = createEmitColorPropertyUpdateFunction(
|
var lightColorChangeFunction = createEmitColorPropertyUpdateFunction(
|
||||||
'diffuseColor', elLightDiffuseRed, elLightDiffuseGreen, elLightDiffuseBlue);
|
'color', elLightColorRed, elLightColorGreen, elLightColorBlue);
|
||||||
elLightDiffuseRed.addEventListener('change', lightDiffuseChangeFunction);
|
elLightColorRed.addEventListener('change', lightColorChangeFunction);
|
||||||
elLightDiffuseGreen.addEventListener('change', lightDiffuseChangeFunction);
|
elLightColorGreen.addEventListener('change', lightColorChangeFunction);
|
||||||
elLightDiffuseBlue.addEventListener('change', lightDiffuseChangeFunction);
|
elLightColorBlue.addEventListener('change', lightColorChangeFunction);
|
||||||
|
|
||||||
elLightConstantAttenuation.addEventListener('change', createEmitNumberPropertyUpdateFunction('constantAttenuation'));
|
elLightIntensity.addEventListener('change', createEmitNumberPropertyUpdateFunction('intensity'));
|
||||||
elLightExponent.addEventListener('change', createEmitNumberPropertyUpdateFunction('exponent'));
|
elLightExponent.addEventListener('change', createEmitNumberPropertyUpdateFunction('exponent'));
|
||||||
elLightCutoff.addEventListener('change', createEmitNumberPropertyUpdateFunction('cutoff'));
|
elLightCutoff.addEventListener('change', createEmitNumberPropertyUpdateFunction('cutoff'));
|
||||||
|
|
||||||
|
@ -708,15 +708,15 @@
|
||||||
<div class="light-section property">
|
<div class="light-section property">
|
||||||
<div class="label">Color</div>
|
<div class="label">Color</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<div class="input-area">R <input class="coord" type='number' id="property-light-diffuse-red"></input></div>
|
<div class="input-area">R <input class="coord" type='number' id="property-light-color-red"></input></div>
|
||||||
<div class="input-area">G <input class="coord" type='number' id="property-light-diffuse-green"></input></div>
|
<div class="input-area">G <input class="coord" type='number' id="property-light-color-green"></input></div>
|
||||||
<div class="input-area">B <input class="coord" type='number' id="property-light-diffuse-blue"></input></div>
|
<div class="input-area">B <input class="coord" type='number' id="property-light-color-blue"></input></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="light-section property">
|
<div class="light-section property">
|
||||||
<div class="label">Intensity</div>
|
<div class="label">Intensity</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
<input class="coord" type='number' id="property-light-constant-attenuation"></input>
|
<input class="coord" type='number' id="property-light-intensity"></input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="light-section property">
|
<div class="light-section property">
|
||||||
|
|
Loading…
Reference in a new issue