mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-02-17 01:12:37 +01:00
Update PetImageView
This commit is contained in:
parent
c2f2aeed1e
commit
b4b6147629
@ -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(() =>
|
||||||
{
|
{
|
||||||
|
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user