Share Posted February 17, 2013 Can't i use translate3d in my tweens? I see x and y for translate, but no translate3d! Link to comment Share on other sites More sharing options...
Share Posted February 17, 2013 Sure, just use z. TweenLite.to(element, 1, {x:100, y:20, z:300}); Link to comment Share on other sites More sharing options...
Author Share Posted February 17, 2013 But x and y will be a 2d translate and not the same as translateX and translateY. Link to comment Share on other sites More sharing options...
Share Posted February 17, 2013 What do you think is different exactly? Link to comment Share on other sites More sharing options...
Author Share Posted February 17, 2013 Isn't that right that translate3d triggers hardware acceleration? So it would be better to use it when it's available... Link to comment Share on other sites More sharing options...
Author Share Posted February 17, 2013 Using z: 0.1 generates a matrix3d, so, i think it's ok! Link to comment Share on other sites More sharing options...
Share Posted February 17, 2013 Yep, and for the record, translate3d() is no different (as far as I know) than adding a translateZ() in terms of triggering hardware acceleration. The whole idea is to just have a non-zero z. It's just that translate3d() is a shorter way than typing out translateX() translateY() translateZ() 1 Link to comment Share on other sites More sharing options...
Share Posted November 18, 2014 Ok.I am using: "{x: 0, y: 0, z: .001}" to replace "translate3d(0, 0, 0)"... is there a way I can trigger this without using a low z value? Link to comment Share on other sites More sharing options...
Share Posted November 18, 2014 Yes in GSAP there is a force3D property you can add to a tween that tells the object to apply this tweak. It only needs to be added to an object once and GSAP will remember it for future tweens. TweenLite.to(foo, 1, { x:100, force3D:true }); 4 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now