mattmogford
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by mattmogford
-
-
-
I haven't tried that, I didn't know of force3D. I'll give that a try.
I'll have to get some 'slower' devices to test it on, but in the mean time, is there a way to disable shortest distance rotating?
Thank you
Matt
-
Hi All,
I have a semi-simple rotation, that increases on it's previous rotation each time.
e.g
Spin 620deg, next time spin from 620deg to 1350deg.
I'm using the jquery gsap plugin --> https://greensock.com/jquery-gsap-plugin
wheelObj.animate( { transform: "translate3d( 0, 0, 0 ) rotate3d( 0, 0, 1, " + rotationAmount + "deg )" // rotationZ : rotationAmount }, { duration: wheelObj.duration, easing: "easeInOutQuad", complete: _THIS.spinWheelToComplete } );
The rotationZ that is commented out worked perfectly fine, it would spin to 620 then to 1350 and so on.
But it doesn't go too well on some android devices, and gets juddery and slows.
So to optimise I'm going for the transform - rotate3d option that should.
The only problem is, something is being 'too' clever, say it's told to rotate to 450deg, it will only rotate the 90deg instead of all the way round once, then another 90.
I hope someone can help with this as I've looked everywhere and nobody seems to have come across this before.
Thanks in advance
Matt
Rotate - But not shortest distance
in GSAP
Posted
Thank you Jonathan,
The code below, seems to have encouraged the previously lagging android devices to run smoothly.
Thanks a lot for your help, such a simple thing fixes a killer bug!
Matt