Skip to content

Commit

Permalink
Remove offset based on text length (#1037)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
  • Loading branch information
aaronchongth authored Nov 26, 2024
1 parent dd4d953 commit 4c56455
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ export const TextThreeRendering = ({ position, text }: TextThreeRenderingProps):
};

const scaleFactor = isHovered ? 2 : 1.0;
const positionX = text && text.length > 5 ? -2 : -1;
return (
<>
<mesh position={position}>
<mesh position={[positionX, 0, positionZ]}>
<mesh position={[0, 0, positionZ]}>
{text && (
<Html zIndexRange={[0, 0, 1]}>
{text && (
Expand Down

0 comments on commit 4c56455

Please # to comment.