Jump to content

Global touchmove?


hannyajin
 Share

Recommended Posts

Hello,

 

How to capture touchmoves Globally on the whole stage like stage.mousemove does for desktops? stage.touchmove doesn't seem to do anything and sprite specific touchmoves only trigger if the touchmove was started inside the sprite while still continuing to register outside of it as long as you don't let go.

 

Thanks.

Link to comment
Share on other sites

  • 4 weeks later...
Got it working like this:
canvas.addEventListener("touchmove", onTouchmove, true);function onTouchmove(e) {x = e.touches[0].clientX / myCanvasScale;y = e.touches[0].clientY / myCanvasScale;}

But indeed, it would be nice if this would be an event directly on the stage, with the same global.x and global.y and the same scaling.

Anyhow: pixijs is the most fun framework to toy around with! Instant happiness everytime!  :D
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...