Improve rendering

This commit is contained in:
Andras Schmelczer 2023-04-30 16:02:07 +01:00
parent f6c7abf8dc
commit afe2a67ba0
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
20 changed files with 148 additions and 96 deletions

View file

@ -48,7 +48,10 @@ export default class GameLoop {
window.addEventListener('resize', this.resize.bind(this));
window.addEventListener('mousemove', this.onSwipe.bind(this));
window.addEventListener('mousedown', (_) => (this.isSwipeActive = true));
window.addEventListener('mousedown', (e) => {
this.isSwipeActive = true;
this.onSwipe(e);
});
window.addEventListener('mouseup', (_) => {
this.isSwipeActive = false;
this.brushPipeline.clearSwipes();