]>
Commit | Line | Data |
---|---|---|
493ec31c RBR |
1 | import { Component } from '@serpentity/serpentity'; |
2 | ||
3 | /** | |
4 | * Component that stores a body for physics calculation | |
5 | * | |
6 | * @extends {external:Serpentity.Component} | |
7 | * @class BodyComponent | |
8 | * @param {object} config a configuration object to extend. | |
9 | */ | |
10 | export default class BodyComponent extends Component { | |
11 | constructor(config) { | |
12 | ||
13 | super(config); | |
14 | ||
15 | /** | |
7ade6f8d | 16 | * The properthy that holds the matterjs body |
493ec31c RBR |
17 | * |
18 | * @property {external:MatterJs.Body} body | |
19 | * @instance | |
20 | * @memberof BodyComponent | |
21 | */ | |
22 | this.body = this.body || null; | |
23 | } | |
24 | }; | |
25 |