interactivity was broken
This commit is contained in:
15
src/main.ts
15
src/main.ts
@ -266,21 +266,30 @@ class BitfielderApp {
|
||||
|
||||
// Touch tracking
|
||||
window.addEventListener('touchstart', (e) => {
|
||||
e.preventDefault();
|
||||
// Only prevent default on canvas area for shader interaction
|
||||
if (e.target === this.canvas) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.touchCount = e.touches.length;
|
||||
this.updateTouchPositions(e.touches);
|
||||
this.initializePinchGesture(e.touches);
|
||||
});
|
||||
|
||||
window.addEventListener('touchmove', (e) => {
|
||||
e.preventDefault();
|
||||
// Only prevent default on canvas area to allow UI scrolling
|
||||
if (e.target === this.canvas) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.touchCount = e.touches.length;
|
||||
this.updateTouchPositions(e.touches);
|
||||
this.updatePinchGesture(e.touches);
|
||||
});
|
||||
|
||||
window.addEventListener('touchend', (e) => {
|
||||
e.preventDefault();
|
||||
// Only prevent default on canvas area
|
||||
if (e.target === this.canvas) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.touchCount = e.touches.length;
|
||||
if (this.touchCount === 0) {
|
||||
this.touch0X = this.touch0Y = this.touch1X = this.touch1Y = 0;
|
||||
|
||||
Reference in New Issue
Block a user