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,
|
key: sprite.id + '-' + spriteAction.action,
|
||||||
url: '/assets/sprites/' + sprite.id + '/' + spriteAction.action + '.png',
|
url: '/assets/sprites/' + sprite.id + '/' + spriteAction.action + '.png',
|
||||||
group: spriteAction.isAnimated ? 'sprite_animations' : 'sprites',
|
group: spriteAction.isAnimated ? 'sprite_animations' : 'sprites',
|
||||||
|
frameCount: JSON.parse(JSON.stringify(spriteAction.sprites)).length,
|
||||||
frameWidth: spriteAction.frameWidth,
|
frameWidth: spriteAction.frameWidth,
|
||||||
frameHeight: spriteAction.frameHeight
|
frameHeight: spriteAction.frameHeight
|
||||||
})
|
})
|
||||||
|
@ -25,6 +25,7 @@ export type TAsset = {
|
|||||||
key: string
|
key: string
|
||||||
url: string
|
url: string
|
||||||
group: 'tiles' | 'objects' | 'sprites' | 'sprite_animations' | 'sound' | 'music' | 'ui' | 'font' | 'other'
|
group: 'tiles' | 'objects' | 'sprites' | 'sprite_animations' | 'sound' | 'music' | 'ui' | 'font' | 'other'
|
||||||
|
frameCount?: number
|
||||||
frameWidth?: number
|
frameWidth?: number
|
||||||
frameHeight?: number
|
frameHeight?: number
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user