mirror of
https://github.com/liabru/matter-js.git
synced 2025-01-13 16:18:50 -05:00
added startdrag and enddrag events to Demo.events
This commit is contained in:
parent
440e9d28ee
commit
7c75614ae3
1 changed files with 18 additions and 0 deletions
|
@ -1132,6 +1132,24 @@
|
||||||
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
_sceneEvents.push(
|
||||||
|
|
||||||
|
// an example of using mouse events on a mouse
|
||||||
|
Events.on(_mouseConstraint, 'startdrag', function(event) {
|
||||||
|
console.log('startdrag', event);
|
||||||
|
})
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
|
_sceneEvents.push(
|
||||||
|
|
||||||
|
// an example of using mouse events on a mouse
|
||||||
|
Events.on(_mouseConstraint, 'enddrag', function(event) {
|
||||||
|
console.log('enddrag', event);
|
||||||
|
})
|
||||||
|
|
||||||
|
);
|
||||||
|
|
||||||
// scene code
|
// scene code
|
||||||
|
|
||||||
var stack = Composites.stack(50, 100, 8, 4, 50, 50, function(x, y, column, row) {
|
var stack = Composites.stack(50, 100, 8, 4, 50, 50, function(x, y, column, row) {
|
||||||
|
|
Loading…
Reference in a new issue