Comments (5)
well I'd say that's due to sequential nature of delivering touch events in flash runtime (one touch event after another). So ur moving consists of small rotations mostly, because you receive one TouchEvent -> moves Touch -> delivers Touch to Gesture -> you rotate and move object a bit. Repeat.
I had idea of buffering touches in the core of the system and then delivering them into Gestures. (In JavaScript, for example, TouchEvent has not one, but array of touches, so runtimes does it for you.)
But I don't have time/motivation to do it.
What you can do to improve visuals:
In your view accumulate transformations from the gesture and apply them a bit later using any approach, for example:
stage.invalidate()
+ Event.RENDER
approach (I'm sure you can google this invalidation approach)
or
delayed for Event.ENTER_FRAME
approach.
Does it make sense to you?
from gestouch.
Thank you, it make sense.
I tried Event.RENDER and Event.ENTER_FRAME (and EXIT_FRAME) and results are approximately the same, no big difference.
When two fingers are closer to each other shakiness is worse...
from gestouch.
You sure you did it right? Can you show your implementation?
Yeah, the closer fingers are – the bigger rotation angle after each finger movement.
Well if delay really doesn't give good result, then maybe you could look at this situation like so:
you want to ignore rotations (not apply them to the view) while you perform panning. What else distinguishes rotations while panning and more intended ones? While you pan they should be like +n, -n, +n, -n (more or less, you should log them while actually doing it). So if rotations from gesture are jumping to positive and negative values – looks like you don't want to apply them. If they're more consistent in their direction (e.g. rotations in N or more events all positive or negative) – that looks more like real rotation intent, so you need to apply some rotation to the view.
from gestouch.
This is code for ENTER_FRAME: http://pastebin.com/6tZRRJCb
Similar code is also for RENDER and invalidate...
I agree with +, - and continuous values... will try that.
from gestouch.
hm if delay doesn't help, I means buffering in the core of the library also wouldn't do the trick.. I imagined that both fingers should dispatch touch events during one frame cycle, so if you apply accumulated transformations – it should be way better. But if you say it doesn't give nice result – I wonder how it actually happens.
If you could provide some log to see what actually happens (list of gesture responses with frame counter just for reference) – that might be useful, as input data. Apart from offsets and rotation maybe Gesture.location
could be useful (center point between touches).
from gestouch.
Related Issues (20)
- Limit panning in TransformGesture HOT 2
- DoubleTab and zoom HOT 3
- use Gestouch in Normal As3 HOT 1
- Gestouch suddenly stopped working on Windows 10 with latest Animate CC HOT 2
- How can I use gestouch in starling2 and normal swf file with together ? HOT 1
- freerotation behaviour HOT 4
- SwipeGesture and Drag Drop HOT 1
- swipe container and tap with button scaling up HOT 19
- air error HOT 6
- Errors when using swipe gesture with Starling HOT 2
- Starling.dispose() loses Gestouch swipe HOT 3
- Gestouch with Air18 HOT 8
- Gestouch suddenly stops working HOT 7
- Cannot register CLICK events on items inside an item dragged with Gestouch HOT 2
- example for drag and zoom and rotate. all together with gestouch HOT 10
- Listeners not working in certain circumstances HOT 15
- SingleTap and DoubleTap - suggestions? HOT 3
- TUIO and Starling HOT 2
- Dispatch SwipeGesture to repeat Event HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gestouch.