1
0
forked from noxious/server

Finish sprite gen. update

This commit is contained in:
2025-02-21 02:01:51 +01:00
parent c59b391a6a
commit 5b06386a39
6 changed files with 87 additions and 64 deletions

View File

@ -81,11 +81,11 @@ export class AvatarController extends BaseController {
if (fs.existsSync(hairSpritePath)) {
// Resize hair sprite to match body dimensions
const resizedHair = await sharp(hairSpritePath)
.resize(bodyMetadata.width, bodyMetadata.height, {
fit: 'contain',
background: { r: 0, g: 0, b: 0, alpha: 0 }
})
.toBuffer()
.resize(bodyMetadata.width, bodyMetadata.height, {
fit: 'contain',
background: { r: 0, g: 0, b: 0, alpha: 0 }
})
.toBuffer()
avatar = avatar.composite([
{