From bc8715f4038c545ca1afb645e16514d531641982 Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 20 Apr 2021 08:19:45 -0500 Subject: [PATCH] chore: API --- packages/physics/src/traits/emitter.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/physics/src/traits/emitter.js b/packages/physics/src/traits/emitter.js index a502546..70fb4b3 100644 --- a/packages/physics/src/traits/emitter.js +++ b/packages/physics/src/traits/emitter.js @@ -288,7 +288,7 @@ export default (latus) => class Emitter extends decorate(Trait) { return stream; }, - emitParticle: (key, json) => { + emitParticle: (key, json = {}) => { const particleJson = this.#particles[key]; if (!particleJson) { return undefined; @@ -296,7 +296,7 @@ export default (latus) => class Emitter extends decorate(Trait) { return this.entity.emitParticleJson(merge(particleJson, json)); }, - jsonForParticle: (key) => this.#particles[key] || {}, + jsonForParticle: (key, json = {}) => merge(this.#particles[key] || {}, json), }; }