]> git.r.bdr.sh - rbdr/sumo/blame - lib/components/grab_area.js
Merge branch 'feature/rbdr-gitlab-pipeline' into 'develop'
[rbdr/sumo] / lib / components / grab_area.js
CommitLineData
1676911c
RBR
1import { Component } from '@serpentity/serpentity';
2
3/**
4 * Component that stores an area used to grab things
5 *
6 * @extends {external:Serpentity.Component}
7 * @class GrabAreaComponent
8 * @param {object} config a configuration object to extend.
9 */
10export default class GrabAreaComponent extends Component {
11 constructor(config) {
12
13 super(config);
14
15 /**
16 * The properthy that holds the angle. Assumes the area behaves as a sensor
17 *
18 * @property {external:MatterJs.Body} area
19 * @instance
20 * @memberof GrabAreaComponent
21 */
22 this.area = this.area || null;
23
24 /**
25 * The constraint that ties this area to its parent
26 *
27 * @property {external:MatterJs.Constraint} constraint
28 * @instance
29 * @memberof GrabAreaComponent
30 */
31 this.constraint = this.constraint || null;
32 }
33};
34