mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 23:12:36 +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 userScaler = 1.0;
|
||||
var DEFAULT_LINE_HEIGHT = entityProps.lineHeight;
|
||||
var ADDITIONAL_PADDING = 1.06;
|
||||
function calculateInitialProperties(uuid) {
|
||||
var adjustedScaler = null;
|
||||
var distance = null;
|
||||
|
@ -82,7 +83,7 @@ function calculateInitialProperties(uuid) {
|
|||
distanceScaler = avatarNametagMode === "on" ? DISTANCE_SCALER_ON : DISTANCE_SCALER_ALWAYS_ON;
|
||||
adjustedScaler = distance * distanceScaler;
|
||||
// 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
|
||||
scaledDimensions = Vec3.multiply(dimensions, adjustedScaler);
|
||||
|
||||
|
|
Loading…
Reference in a new issue