ThemeForest

jQuery animation jagy transition

137 posts
  • Bought between 1 and 9 items
  • Europe
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
FWDesign says

I have a problem with is driving me insane. I use jQuery.animate() to zoom an image element, everything is working great but the transition is not smooth, it kinda jagy , first I thought that a “flash like” smooth transition is not possible but then I’ve seen this component..

http://codecanyon.net/item/estro-jquery-ken-burns-swipe-effect-slider/235111

So can anybody please explain to me how this kinda of smooth transition is possible?

Thank you.

4510 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 4-5 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+4 more
VF says

Instead of using width and height, use CSS3 transform for smooth scale and movements. Additionally, 3d transformations can utilize hardware acceleration on webkit browsers which will improve performance on some cases.

Obviously, fallback with width/height may need for older browsers.

5008 posts The Dude Abides
  • United States
  • Elite Author
  • Has been a member for 4-5 years
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Contributed a Tutorial to a Tuts+ Site
  • Author had a Free File of the Month
+4 more
CodingJack says

first I thought that a “flash like” smooth transition is not possible but then I’ve seen this component.. http://codecanyon.net/item/estro-jquery-ken-burns-swipe-effect-slider/235111 So can anybody please explain to me how this kinda of smooth transition is possible?

That component was made by an animation ninja. My guess is there was a lot of performance testing involved that decided which animation type (jQuery, CSS3 , requestAnimationFrame) worked best for each environment.

1422 posts
  • Microlancer Beta Tester
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Elite Author
  • Exclusive Author
  • Has been a member for 3-4 years
  • Sold between 100 000 and 250 000 dollars
+2 more
ZoomIt says

My guess is that they are using canvas and requestAnimationFrame

I bought the file trying to learn the mechanism but quit after reading 10 lines from their code ( too complicated for non ninjas to understand :D ) – anyway, great job from pixelentity

137 posts
  • Bought between 1 and 9 items
  • Europe
  • Has been a member for 3-4 years
  • Sold between 10 000 and 50 000 dollars
FWDesign says

Thank you guys for answering, about the css3 I tried it works great on all browsers except safari, the only way this can be done secure is with canvas.

4510 posts
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Elite Author
  • Has been a member for 4-5 years
  • Sold between 100 000 and 250 000 dollars
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • India
+4 more
VF says

Thank you guys for answering, about the css3 I tried it works great on all browsers except safari, the only way this can be done secure is with canvas.

Safari needs hardware acceleration to get almost the same performance as Chrome. I guess usage of canvas does this job and the same can be achieved on safari with 3d transform. Just set any 3D property like translate3d(0,0,0) and that’s enough. Some cases may need css based transition for guaranteed performance.

by
by
by
by
by