mirror of
https://github.com/lubosz/overte.git
synced 2025-04-24 18:23:22 +02:00
syntax and clarification on magic number 2 as half height
This commit is contained in:
parent
5bd6dac66c
commit
256853f79b
1 changed files with 2 additions and 2 deletions
|
@ -650,7 +650,7 @@
|
|||
var width = textSize.width + fudge;
|
||||
var height = speechBubbleLineHeight + fudge;
|
||||
|
||||
if(textSize.width >= SPEECH_BUBBLE_MAX_WIDTH) {
|
||||
if (textSize.width >= SPEECH_BUBBLE_MAX_WIDTH) {
|
||||
var numLines = Math.ceil(width);
|
||||
height = speechBubbleLineHeight * numLines + fudge;
|
||||
width = SPEECH_BUBBLE_MAX_WIDTH;
|
||||
|
@ -681,7 +681,7 @@
|
|||
Vec3.sum(
|
||||
headPosition,
|
||||
rotatedOffset);
|
||||
position.y += height / 2; // offset based on wrapped height of bubble
|
||||
position.y += height / 2; // offset based on half of bubble height
|
||||
speechBubbleParams.position = position;
|
||||
|
||||
if (!speechBubbleTextID) {
|
||||
|
|
Loading…
Reference in a new issue