mirror of
https://github.com/kou029w/pucchinglgl.git
synced 2025-01-18 16:18:00 +00:00
feat: handle touchstart
fix: event.preventDefault() error
This commit is contained in:
parent
e5464966c0
commit
8bc857d54f
1 changed files with 2 additions and 1 deletions
|
@ -110,7 +110,8 @@ function main() {
|
||||||
renderer.setSize(window.innerWidth, window.innerHeight);
|
renderer.setSize(window.innerWidth, window.innerHeight);
|
||||||
Object.assign(canvas.style, { width: "100%", height: "100%" });
|
Object.assign(canvas.style, { width: "100%", height: "100%" });
|
||||||
root.addEventListener("keydown", handleKeydown);
|
root.addEventListener("keydown", handleKeydown);
|
||||||
root.addEventListener("touchmove", handleTouchmove);
|
root.addEventListener("touchstart", handleTouchmove, { passive: false });
|
||||||
|
root.addEventListener("touchmove", handleTouchmove, { passive: false });
|
||||||
root.addEventListener("keyup", handleMouseMoveEnd);
|
root.addEventListener("keyup", handleMouseMoveEnd);
|
||||||
root.addEventListener("touchend", handleMouseMoveEnd);
|
root.addEventListener("touchend", handleMouseMoveEnd);
|
||||||
root.addEventListener("mousedown", () => {
|
root.addEventListener("mousedown", () => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue