chore: animation literal

This commit is contained in:
cha0s 2020-06-25 10:15:59 -05:00
parent 9e6df804ce
commit e60742b510

View File

@ -48,6 +48,10 @@ export default class Animated extends decorate(Trait) {
currentAnimation: { currentAnimation: {
type: 'string', type: 'string',
label: 'Current animation', label: 'Current animation',
options: (entity) => (
Object.keys(entity.traitInstance('animated').params.animations)
.reduce((r, key) => ({...r, [key]: key}), {})
),
}, },
} }
} }