Jump to content
GreenSock

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

garyw last won the day on November 22 2015

garyw had the most liked content!

garyw

ShockinglyGreen
  • Content Count

    65
  • Joined

  • Last visited

  • Days Won

    1

garyw last won the day on November 22 2015

garyw had the most liked content!

Community Reputation

16 Newbie

About garyw

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. garyw

    How to group tweens?

    I'll try that, thanks.
  2. garyw

    How to group tweens?

    getTweensOf() doesn't work if you have tweens on multiple elements within a page and you want to get all of the tweens for the parent page. I would have to keep a list of every element that is tweening.
  3. garyw

    How to group tweens?

    Keeping track of the tweens within each page would also require me to track their completions and garbage collect them. I don't see any way to have multiple onComplete callbacks (one for any specific onComplete requirement of the tween and another for the page to track it for garbage collection). It would be much simpler to attach attach a tag to each tween and to get a list of all active tweens with a particular tag.
  4. garyw

    How to group tweens?

    I thought of exportRoot(), but it would include tweens that were created prior to any page, correct? And each subsequent call of exportRoot() would also include the prior ones, right?
  5. I have an SPA app where there can be tweens within each page as well as tweens on the parent shell. Is there any way to tag or group tweens so that I can kill a set of them (for example, all the ones created by a page when the page is unloaded) without killing all of them?
  6. I updated to the latest version and that solved it. Thanks!
  7. Aha, yes! Thank you. I would never have seen that.
  8. I am creating a Draggable with force3D:false. When I drag the object, it still has a translateZ value. When should it go away? Is there a way I can force it to go away on the onDragEnd event handler?
  9. Is anyone else having trouble forking the GSAP codepen template? There is no Fork button any more.
  10. I'm not trying to convince you one way or another, but I would just like to add this: If you put a general-purpose utility method in a toolbox, you don't know what people are going to use it for. It could end up being used for a number of non-animation purposes, and nobody will question whether they are getting an even distribution of randomness until somebody else notices it. <soapbox>If code size is the primary concern, my personal opinion is that the shuffle method should be removed (unless it is required by something else) rather than return mediocre results.
  11. This is what I use: function shuffle(array) { var result = Array.prototype.slice.call(array); // this method supports nodelists, too. for (var i = result.length - 1; i > 0; --i) { var j = Math.floor(Math.random() * (i + 1)); var temp = result; result = result[j]; result[j] = temp; } return result; }
  12. The new shuffle method uses a common algorithm that is, unfortunately, incorrect. See: https://stackoverflow.com/questions/962802/is-it-correct-to-use-javascript-array-sort-method-for-shuffling https://stackoverflow.com/questions/2450954/how-to-randomize-shuffle-a-javascript-array http://www.robweir.com/blog/2010/02/microsoft-random-browser-ballot.html
  13. Yes, I am seeing this behavior with this codepen right now. It's Safari 11.1.2 (11605.3.8.1).
  14. https://github.com/jquery/PEP
×