From fed9a55ffff640905d2adc39210648d815e09dcd Mon Sep 17 00:00:00 2001 From: andrepat0 Date: Thu, 7 Nov 2024 17:49:06 +0100 Subject: [PATCH] fix: removed style that was cropping the half body avatar --- src/components/Avatar/Avatar.tsx | 12 +++++++----- src/components/layouts/totem.css | 16 ++++++++-------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/src/components/Avatar/Avatar.tsx b/src/components/Avatar/Avatar.tsx index d342fb17..d689f879 100644 --- a/src/components/Avatar/Avatar.tsx +++ b/src/components/Avatar/Avatar.tsx @@ -17,6 +17,8 @@ import Edit from '../icons/Edit'; import cx from 'classnames'; import ContainerAvatarView from './AvatarView'; import { useViseme } from '../../context/visemeContext'; +import PositionControls from './AvatarView/AvatarComponent/positionControls/positionControls'; +import { getLocalConfig } from '../../helpers/configuration'; export interface Props { memori: Memori; @@ -35,7 +37,7 @@ export interface Props { isZoomed?: boolean; chatProps?: any; enablePositionControls?: boolean; - setEnablePositionControls?: (value: boolean) => void; + setEnablePositionControls: (value: boolean) => void; avatarType?: 'blob' | 'avatar3d' | undefined; } @@ -138,6 +140,7 @@ const Avatar: React.FC = ({ } > = ({ resetVisemeQueue={resetVisemeQueue} isZoomed={isZoomed} chatEmission={chatProps?.dialogState?.emission} - enablePositionControls={enablePositionControls} setEnablePositionControls={setEnablePositionControls} /> @@ -191,10 +193,10 @@ const Avatar: React.FC = ({ const getAvatarStyle = () => { if (integrationConfig?.avatar === 'readyplayerme') { return { - width: '300px', - height: '300px', + width: '100%', + height: '100%', backgroundColor: 'none', - borderRadius: '100%', + // borderRadius: '100%', boxShadow: 'none', }; } diff --git a/src/components/layouts/totem.css b/src/components/layouts/totem.css index 75cf4d3e..879b688a 100644 --- a/src/components/layouts/totem.css +++ b/src/components/layouts/totem.css @@ -95,28 +95,28 @@ bottom: auto; } -.memori-totem-layout--avatar .memori--avatar-wrapper>div { - overflow: visible !important; +/* .memori-totem-layout--avatar .memori--avatar-wrapper>div { + overflow: visible !important; */ /* width: 100% !important; height: 100% !important; */ - width: auto !important; + /* width: auto !important; height: 90vh !important; max-height: 90vh; border-radius: 0; transform: scale(1.7) translate(0px, 10vh); -} +} */ -.memori-totem-layout--avatar .memori--avatar-wrapper canvas { +/* .memori-totem-layout--avatar .memori--avatar-wrapper canvas { width: auto !important; max-width: 100%; height: 100% !important; max-height: 100%; -} +} */ -.memori-totem-layout--controls { +/* .memori-totem-layout--controls { position: relative; z-index: 5; -} +} */ .memori-totem-layout--controls .memori--start-panel, .memori-totem-layout--controls .memori-chat--history,