mimeartist Posted May 30 Share Posted May 30 I'm trying out quickSetter, whereby I'm changing nine boxes' x, y, width and height... is quick setter the best way to do this... eg. let box_1_1_x = gsap.quickSetter("#box_1_1", "x", "px"); let box_1_1_y = gsap.quickSetter("#box_1_1", "y", "px"); let box_1_1_width = gsap.quickSetter("#box_1_1", "width", "px"); let box_1_1_height = gsap.quickSetter("#box_1_1", "height", "px"); box_1_1_x(0); box_1_1_y(0); box_1_1_width(completeArray[0]); box_1_1_height(completeArray[3]); or is it just as fast to do, (it's definitely less code :D) gsap.set('#box_1_1', { width: completeArray[0], height: completeArray[3], x: 0, y: 0 }); Link to comment Share on other sites More sharing options...
Solution GreenSock Posted May 30 Solution Share Posted May 30 I doubt there'd be much of a noticeable difference, honestly. Technically the quickSetters might be very slightly faster, but you could benchmark it in your particular scenario if you're really curious. 2 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