Jump to content


  • Posts

  • Joined

  • Last visited

Posts posted by justin_hackin

  1. Hi,


    Currently I need to find a way to tell if a Draggable item is either being dragged or is being thrown, in other words, I need to be able to find out when the Draggable is not moving.  To accomplish this, I set these parameters of my draggable: 

    onDragStart: function(){
       isDragThrowing = true;
    onThrowComplete: function () {
       isDragThrowing = false;

    It works most of the time, however, when I click on the throwable object without dragging, the isDragThrowing does not get back to false, presumably because there is no throwProps tween that happens.  So, I thought, oh, that's easy to fix, I'll just make a isDragging and isThrowing.  However, it doesn't seem to be possible to set an isThrowing variable because there is no onThrowStart property where I could set isThrowing to true.  Does anyone have any hints on how I could solve this problem ?


    Your feedback is and would be appreciated :)




  2. GreenSock, thank you for the awesome support.  I tried to drop in this Draggable replacement but it didn't seem to work, I got the following error in the console:


    1. Uncaught TypeError: Cannot read property 'parentNode' of null Draggable.min.js:14


    Somewhat hard to debug with the .min ... any clue what's going on ?  This isn't a big deal so I wouldn't sweat too much over it.  But if there's a quick fix I'd much appreciate knowing about it :)

  3. If I go here http://www.greensock.com/draggable/ and right click item, then click somewhere not on context menu, the items is held dragging until I click to release.  I'm using 

    Google Chrome Version 31.0.1650.57


    Linux Mint 15 Olivia using Cinnamon WM


    It doesn't happen on Firefox V 24.0 though.


    Thanks for all the help.  I'm reluctant to disable the right-click altogether, it might be more annoying than this little inconsistency is.  Its nice to know the issue doesn't happen everywhere, curious to know what browsers/OSes don't produce this behavior.

  4. One thing I noticed with Draggable plugin is that when you right-click a Draggable element and then click outside the context menu, the mouse stays in the mousedown state dragging the object until you click again.  This is an undesirable feature for my application.  Any suggestions on how to disable this behavior ?

  5. Carl, you are awesome, I was bashing my head up against this for some time, I'm really happy that you've solved this issue... I thought I tried something like this before but it must have been something else that was going wrong.  The only demos I've seen used the ticker for animate, not render, maybe that's what solved my problem.   Anyway, keep up the great service !  Don't think we'll need a license for now, but hey, do you folks take donations ?

    • Like 1
  6. I recently started using GSAP for animating three.js as an alternative to https://github.com/sole/tween.js, commonly used for this.  It made it really easy to do something like: make a cube spin and when it stops, wait until one of the faces are square (through a 90 degree rotation with repeat -1 switched on/off).  


    However, I'm struggling with severe performance issues in tweening many objects at a time. I think this has to do with having to create a duplicate copy of the objects to store the tween data rather than just being able to directly tween object variables without having to write in onUpdate.  This makes writing the tween a tad more tedious than tween.js, and it has been no easy task to convert from tween.js to GSAP.  Once I finally did figure out how to do this, I found the performance was severely worse than using tween.js.  I created an example modification of a three.js example which closely relates to the project I'm working on:



    Original, using tween.js: http://jsfiddle.net/justin_hackin/J3k9N/  (Tweening @ 292)

    Single variable for closure in loop, not working: http://jsfiddle.net/justin_hackin/dHLcg/

    TweenMax demo: http://jsfiddle.net/justin_hackin/6bFJc/ (Tweening @ 298)


    I'm wondering, are these performance issues happening because each TweenMax closure is trying to store the whole object copy array ?  I don't quite understand the deeper aspects of JS, excuse my ignorance. 


    Am I doing something wrong here ?  I really love these GSAP libraries so I hope I can make it work for  the project I'm working on.  If not, I really hope the developers will consider making the code more friendly to this kind of use.  The project I'm working on might eventually be willing to invest in such a feature if it would take some efforts to implement, please let me know what could be possible.