mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
add face camera to text properties
This commit is contained in:
parent
7da29daf9d
commit
3b2e0842b0
1 changed files with 7 additions and 1 deletions
|
@ -452,6 +452,7 @@
|
||||||
var elTextText = document.getElementById("property-text-text");
|
var elTextText = document.getElementById("property-text-text");
|
||||||
var elTextLineHeight = document.getElementById("property-text-line-height");
|
var elTextLineHeight = document.getElementById("property-text-line-height");
|
||||||
var elTextTextColor = document.getElementById("property-text-text-color");
|
var elTextTextColor = document.getElementById("property-text-text-color");
|
||||||
|
var elTextFaceCamera = document.getElementById("property-text-face-camera");
|
||||||
var elTextTextColorRed = document.getElementById("property-text-text-color-red");
|
var elTextTextColorRed = document.getElementById("property-text-text-color-red");
|
||||||
var elTextTextColorGreen = document.getElementById("property-text-text-color-green");
|
var elTextTextColorGreen = document.getElementById("property-text-text-color-green");
|
||||||
var elTextTextColorBlue = document.getElementById("property-text-text-color-blue");
|
var elTextTextColorBlue = document.getElementById("property-text-text-color-blue");
|
||||||
|
@ -735,6 +736,7 @@
|
||||||
|
|
||||||
elTextText.value = properties.text;
|
elTextText.value = properties.text;
|
||||||
elTextLineHeight.value = properties.lineHeight.toFixed(4);
|
elTextLineHeight.value = properties.lineHeight.toFixed(4);
|
||||||
|
elTextFaceCamera = properties.faceCamera;
|
||||||
elTextTextColor.style.backgroundColor = "rgb(" + properties.textColor.red + "," + properties.textColor.green + "," + properties.textColor.blue + ")";
|
elTextTextColor.style.backgroundColor = "rgb(" + properties.textColor.red + "," + properties.textColor.green + "," + properties.textColor.blue + ")";
|
||||||
elTextTextColorRed.value = properties.textColor.red;
|
elTextTextColorRed.value = properties.textColor.red;
|
||||||
elTextTextColorGreen.value = properties.textColor.green;
|
elTextTextColorGreen.value = properties.textColor.green;
|
||||||
|
@ -996,8 +998,8 @@
|
||||||
elModelTextures.addEventListener('change', createEmitTextPropertyUpdateFunction('textures'));
|
elModelTextures.addEventListener('change', createEmitTextPropertyUpdateFunction('textures'));
|
||||||
|
|
||||||
elTextText.addEventListener('change', createEmitTextPropertyUpdateFunction('text'));
|
elTextText.addEventListener('change', createEmitTextPropertyUpdateFunction('text'));
|
||||||
|
elTextFaceCamera.addEventListener('change', createEmitCheckedPropertyUpdateFunction('faceCamera'));
|
||||||
elTextLineHeight.addEventListener('change', createEmitNumberPropertyUpdateFunction('lineHeight'));
|
elTextLineHeight.addEventListener('change', createEmitNumberPropertyUpdateFunction('lineHeight'));
|
||||||
|
|
||||||
var textTextColorChangeFunction = createEmitColorPropertyUpdateFunction(
|
var textTextColorChangeFunction = createEmitColorPropertyUpdateFunction(
|
||||||
'textColor', elTextTextColorRed, elTextTextColorGreen, elTextTextColorBlue);
|
'textColor', elTextTextColorRed, elTextTextColorGreen, elTextTextColorBlue);
|
||||||
elTextTextColorRed.addEventListener('change', textTextColorChangeFunction);
|
elTextTextColorRed.addEventListener('change', textTextColorChangeFunction);
|
||||||
|
@ -1715,6 +1717,10 @@
|
||||||
<label for="property-text-text">Text content</label>
|
<label for="property-text-text">Text content</label>
|
||||||
<input type="text" id="property-text-text">
|
<input type="text" id="property-text-text">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="text-group text-section property checkbox">
|
||||||
|
<input type="checkbox" id="property-text-face-camera">
|
||||||
|
<label for="property-text-face-camera"> Face Camera</label>
|
||||||
|
</div>
|
||||||
<div class="text-group text-section property number">
|
<div class="text-group text-section property number">
|
||||||
<label>Line height <span class="unit">m</span></label>
|
<label>Line height <span class="unit">m</span></label>
|
||||||
<input type="number" id="property-text-line-height" min="0" step="0.005">
|
<input type="number" id="property-text-line-height" min="0" step="0.005">
|
||||||
|
|
Loading…
Reference in a new issue