Skip to content

Commit

Permalink
modified: script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Thizh committed Jan 9, 2024
1 parent 8073acb commit 9995240
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
window['webgl-fluid'].default(document.querySelector('canvas'));
document.querySelector('.wrapper')
.addEventListener('mousemove', event => {
console.log('move');
newEvent = new event.constructor(
event.type, event);
document.querySelector('canvas')
.dispatchEvent(newEvent);
});
document.querySelector('button')
.addEventListener('click', event => {
console.log('button clicked');

document.querySelector('.wrapper')
.addEventListener('touchmove', event => {
newEvent = new event.constructor(
event.type, event);
document.querySelector('canvas')
.dispatchEvent(newEvent);
});

0 comments on commit 9995240

Please sign in to comment.