Jump to content
Search Community

Whupper

Members
  • Posts

    1
  • Joined

  • Last visited

Whupper's Achievements

1

Reputation

  1. I like Carl's solution the best. The only improvement I would make is to add the following in the shake: transformOrigin: "center center" It makes it more balanced, especially for the rectangular shape I'm using. That is, in his code example, change: for(var i = 0; i < shakes; i++){ tl.to(element, speed ,{x:initProps.x + R(-4,4), y:initProps.y + R(-2,2), rotation:initProps.rotation + R(-5,5)}) } to: for(var i = 0; i < shakes; i++){ tl.to(element, speed ,{x:initProps.x + R(-4,4), y:initProps.y + R(-2,2), rotation:initProps.rotation + R(-5,5), transformOrigin: "center center"}) }
×
×
  • Create New...