chore: description

This commit is contained in:
cha0s 2021-02-01 23:06:34 -06:00
parent c5da00adcf
commit caa7c1f047

View File

@ -37,57 +37,51 @@ export default (latus) => class Emitter extends decorate(Trait) {
this.#emitter.addEventListener('PARTICLE_UPDATE', this.#onParticleUpdate);
}
static behaviorTypes() {
return {
emitParticleEntity: {
cycle: true,
type: 'entity',
label: 'Create particle.',
args: [
['entity', {
type: 'entity',
}],
],
},
emitParticleJson: {
type: 'stream',
label: 'Create particle.',
args: [
['json', {
type: 'object',
}],
],
},
emitParticle: {
type: 'stream',
label: 'Create particle.',
args: [
['key', {
type: 'string',
options: (entity) => (
Object.keys(entity.trait('Emitter').particles)
.reduce((r, key) => ({...r, [key]: key}), {})
),
}],
['json', {
type: 'object',
}],
],
},
};
}
static defaultParams() {
return {
particles: {},
};
}
static describeParams() {
static describe(entity) {
return {
particles: {
type: 'object',
label: 'Particles',
emitParticleEntity: {
type: 'entity',
label: 'Create particle.',
args: [
{
label: 'entity',
type: 'entity',
},
],
},
emitParticleJson: {
type: 'void',
label: 'Create particle.',
args: [
{
label: 'json',
type: 'object',
},
],
},
emitParticle: {
type: 'void',
label: 'Create particle.',
args: [
{
label: 'key',
type: 'string',
options: () => (
Object.keys(entity.trait('Emitter').particles)
.reduce((r, key) => ({...r, [key]: key}), {})
),
},
{
label: 'json',
type: 'object',
},
],
},
};
}