- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
const orbs = Object.keys(defaultOrbs).reduce((acc, el) => {
const newAcc = {}
Object.keys(defaultOrbs[el]).forEach((elk) => {
if (newAcc[elk] == null) newAcc[elk] = { ...(acc[elk] || {})}
newAcc[elk][el] = defaultOrbs[el][elk]
})
return newAcc
}, {})
invoke(orbs, mult) {
if(this.props.onChange) {
this.props.onChange(Object.keys(orbs).reduce((acc, el) => ({
...acc,
[el]: Object.keys(orbs[el]).reduce((ack, elk) => ({
...ack,
[elk]: orbs[el][elk] * mult
}), {})
}), {}))
}
}