add hand + grab cursor for own player

This commit is contained in:
Zutatensuppe 2020-11-07 17:49:42 +01:00
parent 61837a155f
commit ca387b53ec
6 changed files with 82 additions and 11 deletions

View file

@ -6,7 +6,7 @@ export default class EventAdapter {
canvas.addEventListener('mousemove', this._mouseMove.bind(this))
canvas.addEventListener('wheel', this._wheel.bind(this))
}
consumeAll() {
if (this._mouseEvts.length === 0) {
return []
@ -33,6 +33,6 @@ export default class EventAdapter {
}
_wheel(e) {
this._mouseEvts.push({type: 'wheel', y: e.deltaY})
this._mouseEvts.push({type: 'wheel', deltaY: e.deltaY, x: e.offsetX, y: e.offsetY})
}
}
}