1
0
forked from noxious/server

Spritesheet gen. optimisations

This commit is contained in:
2024-12-15 14:41:00 +01:00
parent 179ccdbc55
commit 65cae5d824
2 changed files with 36 additions and 13 deletions

View File

@ -154,8 +154,8 @@ export default class SpriteUpdateEvent {
input: buffer,
// Center horizontally based on the exact middle of each frame
left: (index * frameWidth) + ((frameWidth - width) >> 1),
// Calculate vertical position to center in the available space
top: ((frameHeight - height) >> 1)
// Top position is always 0
top: 0
}))
)
.png()