]>
git.r.bdr.sh - rbdr/sumo/blob - lib/components/grab_area.js
1 import { Component
} from '@serpentity/serpentity';
4 * Component that stores an area used to grab things
6 * @extends {external:Serpentity.Component}
7 * @class GrabAreaComponent
8 * @param {object} config a configuration object to extend.
10 export default class GrabAreaComponent
extends Component
{
16 * The properthy that holds the angle. Assumes the area behaves as a sensor
18 * @property {external:MatterJs.Body} area
20 * @memberof GrabAreaComponent
22 this.area
= this.area
|| null;
25 * The constraint that ties this area to its parent
27 * @property {external:MatterJs.Constraint} constraint
29 * @memberof GrabAreaComponent
31 this.constraint
= this.constraint
|| null;