mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 19:59:28 +02:00
adding extra padding to the initial textbox calculation
This commit is contained in:
parent
ef0977248d
commit
f87e306ad4
1 changed files with 2 additions and 1 deletions
|
@ -59,6 +59,7 @@ var DISTANCE_SCALER_ALWAYS_ON = 0.45;
|
||||||
var distanceScaler = DISTANCE_SCALER_ON;
|
var distanceScaler = DISTANCE_SCALER_ON;
|
||||||
var userScaler = 1.0;
|
var userScaler = 1.0;
|
||||||
var DEFAULT_LINE_HEIGHT = entityProps.lineHeight;
|
var DEFAULT_LINE_HEIGHT = entityProps.lineHeight;
|
||||||
|
var ADDITIONAL_PADDING = 1.06;
|
||||||
function calculateInitialProperties(uuid) {
|
function calculateInitialProperties(uuid) {
|
||||||
var adjustedScaler = null;
|
var adjustedScaler = null;
|
||||||
var distance = null;
|
var distance = null;
|
||||||
|
@ -82,7 +83,7 @@ function calculateInitialProperties(uuid) {
|
||||||
distanceScaler = avatarNametagMode === "on" ? DISTANCE_SCALER_ON : DISTANCE_SCALER_ALWAYS_ON;
|
distanceScaler = avatarNametagMode === "on" ? DISTANCE_SCALER_ON : DISTANCE_SCALER_ALWAYS_ON;
|
||||||
adjustedScaler = distance * distanceScaler;
|
adjustedScaler = distance * distanceScaler;
|
||||||
// Get the new dimensions from the text helper
|
// Get the new dimensions from the text helper
|
||||||
dimensions = [textHelper.getTotalTextLength(), DEFAULT_LINE_HEIGHT, Z_SIZE];
|
dimensions = [textHelper.getTotalTextLength() * ADDITIONAL_PADDING, DEFAULT_LINE_HEIGHT, Z_SIZE];
|
||||||
// Adjust the dimensions by the modified distance scaler
|
// Adjust the dimensions by the modified distance scaler
|
||||||
scaledDimensions = Vec3.multiply(dimensions, adjustedScaler);
|
scaledDimensions = Vec3.multiply(dimensions, adjustedScaler);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue