The Body that is currently being moved by the user, or null if no body.
An Object that specifies the collision filter properties.
The collision filter allows the user to define which types of body this mouse constraint can interact with.
See body.collisionFilter for more information.
The Constraint object that is used to move the body during interaction.
A String denoting the type of object.
StaticcreateCreates a new mouse constraint.
All properties have default values, and many are pre-calculated automatically based on other properties.
See the properties section below for detailed information on what you can pass via the options object.
Optionaloptions: MatterJS.IMouseConstraintDefinitionA new MouseConstraint
The
Matter.MouseConstraintmodule contains methods for creating mouse constraints. Mouse constraints are used for allowing user interaction, providing the ability to move bodies via the mouse or touch.See the included usage examples.
MouseConstraint