mirror of
https://github.com/overte-org/overte.git
synced 2025-04-17 01:56:39 +02:00
Merge pull request #8066 from imgntn/faceCameraText
Add face camera option to edit.js text entity properties
This commit is contained in:
commit
852eda3101
1 changed files with 7 additions and 1 deletions
|
@ -452,6 +452,7 @@
|
|||
var elTextText = document.getElementById("property-text-text");
|
||||
var elTextLineHeight = document.getElementById("property-text-line-height");
|
||||
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 elTextTextColorGreen = document.getElementById("property-text-text-color-green");
|
||||
var elTextTextColorBlue = document.getElementById("property-text-text-color-blue");
|
||||
|
@ -726,6 +727,7 @@
|
|||
|
||||
elTextText.value = properties.text;
|
||||
elTextLineHeight.value = properties.lineHeight.toFixed(4);
|
||||
elTextFaceCamera = properties.faceCamera;
|
||||
elTextTextColor.style.backgroundColor = "rgb(" + properties.textColor.red + "," + properties.textColor.green + "," + properties.textColor.blue + ")";
|
||||
elTextTextColorRed.value = properties.textColor.red;
|
||||
elTextTextColorGreen.value = properties.textColor.green;
|
||||
|
@ -988,8 +990,8 @@
|
|||
elModelTextures.addEventListener('change', createEmitTextPropertyUpdateFunction('textures'));
|
||||
|
||||
elTextText.addEventListener('change', createEmitTextPropertyUpdateFunction('text'));
|
||||
elTextFaceCamera.addEventListener('change', createEmitCheckedPropertyUpdateFunction('faceCamera'));
|
||||
elTextLineHeight.addEventListener('change', createEmitNumberPropertyUpdateFunction('lineHeight'));
|
||||
|
||||
var textTextColorChangeFunction = createEmitColorPropertyUpdateFunction(
|
||||
'textColor', elTextTextColorRed, elTextTextColorGreen, elTextTextColorBlue);
|
||||
elTextTextColorRed.addEventListener('change', textTextColorChangeFunction);
|
||||
|
@ -1707,6 +1709,10 @@
|
|||
<label for="property-text-text">Text content</label>
|
||||
<input type="text" id="property-text-text">
|
||||
</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">
|
||||
<label>Line height <span class="unit">m</span></label>
|
||||
<input type="number" id="property-text-line-height" min="0" step="0.005">
|
||||
|
|
Loading…
Reference in a new issue