Skip to content

Commit b52f887

Browse files
committed
Handle avatar scale for chat bubbles
1 parent 2382dd8 commit b52f887

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

scripts/communityScripts/chatBubbles.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,16 @@ function ChatBubbles_SpawnBubble(data, senderID) {
3333
delete currentBubbles[senderID];
3434
}
3535

36-
// TODO: handle avatar scale
36+
const scale = AvatarList.getAvatar(senderID).scale;
37+
3738
const bubbleEntity = Entities.addEntity({
3839
type: "Text",
3940
parentID: senderID,
4041
text: data.message,
4142
unlit: true,
4243
lineHeight: 0.07,
4344
dimensions: [1.3, 4, 0.01],
44-
localPosition: [0, 3.1, 0],
45+
localPosition: [0, scale + 2.1, 0],
4546
backgroundAlpha: 0,
4647
textEffect: "outline fill",
4748
textEffectColor: "#000",
@@ -77,15 +78,16 @@ function ChatBubbles_IndicatorTick(senderID) {
7778
function ChatBubbles_ShowTypingIndicator(senderID) {
7879
if (typingIndicators[senderID]) { return; }
7980

80-
// TODO: handle avatar scale
81+
const scale = AvatarList.getAvatar(senderID).scale;
82+
8183
const indicatorEntity = Entities.addEntity({
8284
type: "Text",
8385
parentID: senderID,
8486
text: "•••",
8587
unlit: true,
8688
lineHeight: 0.2,
8789
dimensions: [0.22, 0.1, 0.01],
88-
localPosition: [0, 1, 0],
90+
localPosition: [0, scale, 0],
8991
backgroundAlpha: 0.8,
9092
canCastShadow: false,
9193
billboardMode: "full",

0 commit comments

Comments
 (0)