Skip to content

Commit

Permalink
chat position
Browse files Browse the repository at this point in the history
  • Loading branch information
Narazaka committed Jul 13, 2023
1 parent 6bd8fe2 commit d6b3858
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function handleChatBalloon(
avatarObject: THREE.Object3D,
text: string | undefined,
options?: {
position?: { x?: number; y?: number };
nameplatePositionHeightOptions?: NameplatePositionHeightOptions;
textTextureOptions?: ChatBalloonTextTexrureOptions;
},
Expand All @@ -90,7 +91,8 @@ function handleChatBalloon(
"chatBalloon",
{
afterCreate: (s) => {
s.position.y = 0.4;
s.position.x = options?.position?.x || 0;
s.position.y = options?.position?.y || 0.4;
},
afterExists: () => {
exists = true;
Expand Down Expand Up @@ -164,6 +166,8 @@ export default ({
* @default true
*/
local?: boolean;
/** position */
position?: { x?: number; y?: number };
/**
* nameplate position height options
*/
Expand Down

0 comments on commit d6b3858

Please sign in to comment.