feat: Physical

This commit is contained in:
cha0s 2019-03-22 13:16:07 -05:00
parent 6c26e87840
commit 1098725636

View File

@ -0,0 +1,26 @@
import {compose} from '@avocado/core';
import {Vector} from '@avocado/math';
import {shapeFromJSON} from '@avocado/physics';
import {simpleState, Trait} from '../trait';
const decorate = compose(
);
export class Physical extends decorate(Trait) {
static defaultParams() {
return {
shape: undefined,
};
}
initialize() {
this._shape = shapeFromJSON(this.params.get('shape'));
}
get shape() {
return this._shape;
}
}