forked from noxious/server
Send frameCount for assets to client
This commit is contained in:
parent
6f057639c0
commit
cc9eada654
@ -30,6 +30,7 @@ async function addHttpRoutes(app: Application) {
|
||||
key: sprite.id + '-' + spriteAction.action,
|
||||
url: '/assets/sprites/' + sprite.id + '/' + spriteAction.action + '.png',
|
||||
group: spriteAction.isAnimated ? 'sprite_animations' : 'sprites',
|
||||
frameCount: JSON.parse(JSON.stringify(spriteAction.sprites)).length,
|
||||
frameWidth: spriteAction.frameWidth,
|
||||
frameHeight: spriteAction.frameHeight
|
||||
})
|
||||
|
@ -25,6 +25,7 @@ export type TAsset = {
|
||||
key: string
|
||||
url: string
|
||||
group: 'tiles' | 'objects' | 'sprites' | 'sprite_animations' | 'sound' | 'music' | 'ui' | 'font' | 'other'
|
||||
frameCount?: number
|
||||
frameWidth?: number
|
||||
frameHeight?: number
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user