aboutsummaryrefslogtreecommitdiff
path: root/lib/components/body.js
blob: 6034d3ec704cd7b2babb36869b6ef99f4f8174ff (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import { Component } from '@serpentity/serpentity';

/**
 * Component that stores a body for physics calculation
 *
 * @extends {external:Serpentity.Component}
 * @class BodyComponent
 * @param {object} config a configuration object to extend.
 */
export default class BodyComponent extends Component {
  constructor(config) {

    super(config);

    /**
     * The properthy that holds the matterjs body
     *
     * @property {external:MatterJs.Body} body
     * @instance
     * @memberof BodyComponent
     */
    this.body = this.body || null;
  }
}