mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 16:41:02 +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 width = textSize.width + fudge;
|
||||||
var height = speechBubbleLineHeight + fudge;
|
var height = speechBubbleLineHeight + fudge;
|
||||||
|
|
||||||
if(textSize.width >= SPEECH_BUBBLE_MAX_WIDTH) {
|
if (textSize.width >= SPEECH_BUBBLE_MAX_WIDTH) {
|
||||||
var numLines = Math.ceil(width);
|
var numLines = Math.ceil(width);
|
||||||
height = speechBubbleLineHeight * numLines + fudge;
|
height = speechBubbleLineHeight * numLines + fudge;
|
||||||
width = SPEECH_BUBBLE_MAX_WIDTH;
|
width = SPEECH_BUBBLE_MAX_WIDTH;
|
||||||
|
@ -681,7 +681,7 @@
|
||||||
Vec3.sum(
|
Vec3.sum(
|
||||||
headPosition,
|
headPosition,
|
||||||
rotatedOffset);
|
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;
|
speechBubbleParams.position = position;
|
||||||
|
|
||||||
if (!speechBubbleTextID) {
|
if (!speechBubbleTextID) {
|
||||||
|
|
Loading…
Reference in a new issue