Update PetImageView

This commit is contained in:
Bill 2021-06-22 14:25:43 -04:00
parent c2f2aeed1e
commit b4b6147629
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ import { PetImageViewProps } from './PetImageView.types';
export const PetImageView: FC<PetImageViewProps> = props => export const PetImageView: FC<PetImageViewProps> = props =>
{ {
const { figure = '', typeId = -1, paletteId = -1, color = 0xFFFFFF, customParts = [], headOnly = false, direction = 0, scale = 1 } = props; const { figure = '', typeId = -1, paletteId = -1, color = 0xFFFFFF, customParts = [], posture = 'std', headOnly = false, direction = 0, scale = 1 } = props;
const [ petUrl, setPetUrl ] = useState<string>(null); const [ petUrl, setPetUrl ] = useState<string>(null);
@ -38,7 +38,7 @@ export const PetImageView: FC<PetImageViewProps> = props =>
{ {
} }
}, headOnly, 0, petCustomParts, 'std'); }, headOnly, 0, petCustomParts, posture);
if(imageResult) if(imageResult)
{ {
@ -48,7 +48,7 @@ export const PetImageView: FC<PetImageViewProps> = props =>
} }
return url; return url;
}, [ figure, typeId, paletteId, color, customParts, headOnly, direction ]); }, [ figure, typeId, paletteId, color, customParts, posture, headOnly, direction ]);
useEffect(() => useEffect(() =>
{ {

View File

@ -7,6 +7,7 @@ export interface PetImageViewProps
paletteId?: number; paletteId?: number;
color?: number; color?: number;
customParts?: PetCustomPart[]; customParts?: PetCustomPart[];
posture?: string;
headOnly?: boolean; headOnly?: boolean;
direction?: number; direction?: number;
scale?: number; scale?: number;