]> git.r.bdr.sh - rbdr/sumo/blame_incremental - lib/components/grab_area.js
Colorize the winner renderer
[rbdr/sumo] / lib / components / grab_area.js
... / ...
CommitLineData
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