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: [
|
args: [
|
||||||
['key', {
|
['key', {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
|
options: (entity) => (
|
||||||
|
Object.keys(entity.traitInstance('emitter').particles)
|
||||||
|
.reduce((r, key) => ({...r, [key]: key}), {})
|
||||||
|
),
|
||||||
}],
|
}],
|
||||||
['json', {
|
['json', {
|
||||||
type: 'object',
|
type: 'object',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user