diff options
Diffstat (limited to 'lib/components/body.js')
| -rw-r--r-- | lib/components/body.js | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/components/body.js b/lib/components/body.js new file mode 100644 index 0000000..7438dc3 --- /dev/null +++ b/lib/components/body.js @@ -0,0 +1,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 pixi container + * + * @property {external:MatterJs.Body} body + * @instance + * @memberof BodyComponent + */ + this.body = this.body || null; + } +}; + |