forked from noxious/server
Spritesheet gen. optimisations
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user