21 lines
338 B
JavaScript
21 lines
338 B
JavaScript
import {compose, virtualize} from '@avocado/core';
|
|
|
|
const decorate = compose(
|
|
virtualize([
|
|
'applyForce',
|
|
'applyImpulse',
|
|
'vertices',
|
|
]),
|
|
);
|
|
|
|
export class AbstractBody extends decorate(class {}) {
|
|
|
|
constructor(world, shape) {
|
|
super();
|
|
this.impulse = [0, 0];
|
|
this.shape = shape;
|
|
this.world = world;
|
|
}
|
|
|
|
}
|