diff --git a/packages/physics/src/traits/shaped.js b/packages/physics/src/traits/shaped.js index 768a21b..fd6f331 100644 --- a/packages/physics/src/traits/shaped.js +++ b/packages/physics/src/traits/shaped.js @@ -16,7 +16,11 @@ export default () => class Shaped extends decorate(Trait) { static defaultParams() { return { isDebugging: false, - shape: undefined, + shape: { + type: 'rectangle', + position: [0, 0], + size: [0, 0], + }, }; } diff --git a/packages/timing/src/traits/animated.js b/packages/timing/src/traits/animated.js index a77383b..744e869 100644 --- a/packages/timing/src/traits/animated.js +++ b/packages/timing/src/traits/animated.js @@ -204,10 +204,10 @@ export default (latus) => class Animated extends decorate(Trait) { async load(json) { await super.load(json); - if (Object.keys(json.params.animations).length > 0) { + if (Object.keys(this.params.animations).length > 0) { const {Animation} = latus.get('%resources'); const animations = await mapValuesAsync( - json.params.animations, + this.params.animations, (json) => Animation.load(json), ); const animationViews = mapValues(