chore: defaults
This commit is contained in:
parent
176fffd9e7
commit
9e0e08e194
|
@ -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],
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user