Jump to content
Search Community

matrix3d, transition and borderRadius conflict on Chrome

TommyDee test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi,

I'm having some problems using matrix3d and borderRadius. You can fine a fiddle here:

 

http://jsfiddle.net/wasabit/KvDEr/

 

If you run the fiddle on Chrome, the borderRadius animation isn't rendered (if you resize the browser window, the borderRadius become correct).

> if you comment "left:300" in the tweenmax call, the borderRadius animation works

> if you comment -webkit-transform:matrix3d..., the borderRadius animation works

 

I know this is not the perfect example (the original script is more complex), but I tried to make it understandable.

 

 

Hope someone can help.

Kind regards

Link to comment
Share on other sites

Hi,
 
According to my minimal knowledge in 3d transform matrix, the value you're modifying (0.01) in the matrix is the perspective projection in the Z axis, but your element is not inside one that has a perspective, therefore that value won't have an effect if any because is too small.
 
A possibility would be to, instead doing it through the css you could do it through the engine, avoiding the vendor prefixes, like this:

TweenMax.set($("#container"), {z:10});

 
I updated your fiddle but the problem remains, only in Chrome, works fine in firefox, IE9+, Safari 5, which led me to think that's basically a browser issue and not the engine. Unfortunately Chrome has some issues with animations, if you google for chrome and animation issues you're going to find that chrome has problems with CSS3 transitions, jquery animate(), other js libraries, canvas and svg animations.

 

 

Here's the updated fiddle:

http://jsfiddle.net/KvDEr/2/

 

Another update on the fiddle in order to pass the values directly through JQuery's css method on a tween update didn't work either, you can see it here:

http://jsfiddle.net/KvDEr/3/

 

What does work is to create an independent tween for the radius with a delay of 1 second:


TweenMax.to($("#container"), 1, {borderRadius:'100px', delay:1});

Of course this kills the beauty of the simultaneous tweens, but gets the job done.

 

 

My thought is that this is mainly a chrome rendering issue and out of my capacities, maybe Jack or Carl could give us more light in this one.

 

Well I hope this helps a little,

Cheers,

Rodrigo.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...