I can't seem to capture Touch position.I'd like to track user touch movement (x,y) at regular time intervals after Event.TouchStartCan't get anything to work....Where do I start? Ideas?Thanks.
I found Jordan Robert Dobson's Pointer Module which helped a bit. How would I get it to continuously record the (x,y) is the user moves his finger.
Here's the syntax:
layerA.on Events.Click, (event, layer) ->myTouchEvent = Events.touchEvent(event)
Andrew Nalband I've been using Framer for a while. Learned to code (a bit) through it. And I have know idea what to with this...
Ok, well if you want to share your project and show me exactly what you're trying to achieve I'll walk you through it.
Andrew Nalband There nothing really to see just yet... I just want to capture the position of the touch event throughout the duration of the touch move many times so I can get a rough track of the gesture
here ya go http://share.framerjs.com/golu795n8nhc/
Here's the code - hey Koen Bok - can we get an update to the docs that uses this example for the touch events? This is the second time I've answered this question today! :)
bg.on Events.TouchMove, (event, layer) -> touchX = Events.touchEvent(event).clientX touchY = Events.touchEvent(event).clientY
Andrew Nalband thanks. awesome. This code is kinda different than what I'm used to in Framer. I guess - every time the X or Y gets updated myTouchEvent gets updated.
Everytime a TouchMove event is triggered (that is, the user moves their finger), touchX and touchY is updated with the X and Y position. In the code above, you can remove the myTouchEvent line since it does nothing.
Oops, forgot to take that out!
Guys my pointer module will make this a lot more sane from desktop to touch.
Jordan Robert Dobson Koen Bok Benjamin Den Boer - any ideas on how we can make this stuff easier for people? Framerco.de definitely helps, but it seems like there should be an easy way to browse, understand and import different modules. There are lots of useful ones out there, but searching in the facebook group, trying to get your head around the purpose of a module and then actually knowing how to implement this stuff is a rather fragmented and difficult process. Most stuff is pretty spotty on documentation (understandably), and there's no real social proof or voting mechanism for determining what the "good" ones are.
By the way, reading this thread keeps putting this song in my mind: https://www.youtube.com/watch?v=AV4smtJrIOM. You're welcome!
Thanks for all the input.