Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

Search the Community

Showing results for tags 'round'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests

Found 3 results

  1. GreenSock

    SnapPlugin

    If you'd like the inbetween values in a tween to always get snapped to the nearest value in a given array or increment, use the snap special property. Just pass in an object with the property that you want to snap and the value(s) that you want it to snap to. For example, if you're tweening the x, y, and alpha properties of an object and you want to snap the x and y values (not alpha) every time the tween is rendered, you could do something like this: gsap.to(element, {duration: 2, x: 300, y: 200, alpha: 0.5, snap: { x: 50, // Snaps to the nearest incrememt of 50 (0, 50, 100, etc.) y: [10, 30, 70, 100, 150] // Snaps to the nearest value in the given array }}); Alternatively, have the tween snap only when it's within a certain range of given values: gsap.to(".class", { x: 1000, snap: { // x snaps to the closest value in the array but only when it's within 20 pixels of it. x: {values: [0, 50, 150, 500], radius: 20} } }); For more info, check out the SnapPlugin docs.
  2. Note: This plugin was replaced by SnapPlugin in GSAP 3. Please see the GSAP 3 release notes for details. If you'd like the inbetween values in a tween to always get rounded to the nearest integer, use the roundProps special property. Just pass in a comma-delimited String containing the property names that you'd like rounded. For example, if you're tweening the x, y, and alpha properties of mc and you want to round the x and y values (not alpha) every time the tween is rendered, you'd do: TweenMax.to(element, 2, {x:300, y:200, alpha:0.5, roundProps:"x,y"});
  3. I'm no real programmer but I created this: http://fizion.maakt.nu/gstest/ Not sure why but there's something wrong with the 3D transform. If you look (in Chrome) at the developer tools you see that it will be something like this after one (or a few) clicks -webkit-transform: matrix3d(0.99992, 0, -0.01243, 0, 0, 1, 0, 0, 0.01243, 0, 0.99992, 0, 0, 0, 0, 1); I removed the perspective from the wrapper but still the same. I tried to do something with roundProps but no luck so far. As far as I could see the first click is always working like it's supposed to be working. Since I rotate with 90 degrees I'm not sure why it behaves like this. If you click more often the difference will get bigger and bigger which is not really my intention. Hope someone can help me out.
×