Sign in to follow this  
gamify

click and double click

Recommended Posts

Yes, it is possible.

I assume your real question is how to implement double-click? You've probably noticed that melonJS only supports the PointerEvent spec, which itself does not specify gestures like double-click, pinch, or swipe.

You can build your own by introducing a delay in the pointerup handler; set a timeout, then wait for one of the following events to occur:

  • If a pointerdown event is received while waiting, this event needs to be promoted to a double-click event and triggered immediately.
  • If the timeout expires first, trigger a single-click event immediately.

The delay is configurable by the host operating system, it is usually about 300ms. We don't have any way of querying the UA to get any information about gesture settings.

That said, I found the same question asked on the Babylon forum: 

 

Share this post


Link to post
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...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.