feat: particle options
This commit is contained in:
parent
fd374588b8
commit
a32159cee9
|
@ -435,4 +435,8 @@ export default class Entity extends decorate(Resource) {
|
|||
};
|
||||
}
|
||||
|
||||
traitInstance(type) {
|
||||
return this._traits[type];
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -41,6 +41,10 @@ export default class Emitter extends decorate(Trait) {
|
|||
args: [
|
||||
['key', {
|
||||
type: 'string',
|
||||
options: (entity) => (
|
||||
Object.keys(entity.traitInstance('emitter').particles)
|
||||
.reduce((r, key) => ({...r, [key]: key}), {})
|
||||
),
|
||||
}],
|
||||
['json', {
|
||||
type: 'object',
|
||||
|
|
Loading…
Reference in New Issue
Block a user