speech bubbles
This commit is contained in:
parent
b79460e8ac
commit
a353c0347d
@ -138,7 +138,7 @@ export class Game {
|
||||
);
|
||||
|
||||
if (player && player.user.id !== this.me.id) {
|
||||
// (player as PlayerEntity).addChat(event.message);
|
||||
(player as PlayerEntity).addChat(event.message);
|
||||
}
|
||||
|
||||
this.chat.addMessage(event.sender.display_name, event.message);
|
||||
|
@ -64,11 +64,12 @@ export class PlayerEntity extends PonyEntity {
|
||||
const newChat = new ChatBubble(chatBuilder, lines);
|
||||
|
||||
this._chats.forEach((item) => {
|
||||
item.tag.position.add(new THREE.Vector3(0, item.height * 0.01, 0));
|
||||
const scaled = item.tag.scale.y;
|
||||
item.tag.position.add(new THREE.Vector3(0, scaled, 0));
|
||||
});
|
||||
|
||||
this._chats.unshift(newChat);
|
||||
newChat.tag.position.set(0, 1.8, 0.5);
|
||||
newChat.tag.position.set(0, 1.8 + this.nameTag.tag.scale.y + 0.15, 0.5);
|
||||
this.container.add(newChat.tag);
|
||||
|
||||
if (this._chats.length > 3) {
|
||||
|
Loading…
Reference in New Issue
Block a user