refactor: Defaults
This commit is contained in:
parent
f70818ed69
commit
991bec522f
|
@ -33,6 +33,7 @@
|
|||
"deepmerge": "^4.2.2",
|
||||
"immutable": "^4.0.0-rc.12",
|
||||
"kefir": "^3.8.8",
|
||||
"lodash.get": "^4.4.2",
|
||||
"matter-js": "0.14.2",
|
||||
"poly-decomp": "0.3.0",
|
||||
"proton-engine": "^4.2.1"
|
||||
|
|
|
@ -3,6 +3,7 @@ import {Ticker} from '@avocado/timing';
|
|||
import {Trait} from '@avocado/traits';
|
||||
import {compose} from '@latus/core';
|
||||
import merge from 'deepmerge';
|
||||
import get from 'lodash.get';
|
||||
import K from 'kefir';
|
||||
|
||||
import Proton from '../proton';
|
||||
|
@ -93,6 +94,7 @@ export default (latus) => class Emitter extends decorate(Trait) {
|
|||
|
||||
async emitParticleJson(json) {
|
||||
const {Entity} = latus.get('%resources');
|
||||
const isListed = get(json, 'traits.Emitted.params.listed', true);
|
||||
return this.entity.emitParticleEntity(
|
||||
await Entity.load(
|
||||
merge(
|
||||
|
@ -100,6 +102,7 @@ export default (latus) => class Emitter extends decorate(Trait) {
|
|||
traits: {
|
||||
Positioned: {},
|
||||
Visible: {},
|
||||
...(isListed ? {Listed: {}} : {}),
|
||||
},
|
||||
},
|
||||
json,
|
||||
|
|
Loading…
Reference in New Issue
Block a user