mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
🆕 🐶 have you favorite pet as your best pall next to you
This commit is contained in:
@@ -32,6 +32,9 @@ export class AvatarEditorThumbnailsHelper
|
||||
AvatarFigurePartType.HEAD_ACCESSORY,
|
||||
AvatarFigurePartType.HEAD_ACCESSORY_EXTRA,
|
||||
AvatarFigurePartType.RIGHT_HAND_ITEM,
|
||||
AvatarFigurePartType.PET,
|
||||
'ptl',
|
||||
'ptr',
|
||||
];
|
||||
|
||||
private static getThumbnailKey(setType: string, part: IAvatarEditorCategoryPartItem): string
|
||||
@@ -106,6 +109,22 @@ export class AvatarEditorThumbnailsHelper
|
||||
container.addChild(sprite);
|
||||
}
|
||||
|
||||
if(container.children.length > 0)
|
||||
{
|
||||
const isPetPart = parts.some(p => p.type === 'pt' || p.type === 'ptl' || p.type === 'ptr');
|
||||
|
||||
if(isPetPart)
|
||||
{
|
||||
const bounds = container.getBounds();
|
||||
|
||||
for(const child of container.children)
|
||||
{
|
||||
(child as NitroSprite).position.x -= bounds.x;
|
||||
(child as NitroSprite).position.y -= bounds.y;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return container;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user