Jump to content
Search Community

cpkn_dev

Business
  • Posts

    7
  • Joined

  • Last visited

Everything posted by cpkn_dev

  1. Currently I'm trying to use draggable to be able to move blocks onto target spots, and if the spot isn't "exact" it would adjust them to be exactly on top of the element. I've attached a minimal example The part I'm getting stuck on is here: // move onto target gsap.to(e.target, 0.1, { left: p.left, top: p.top, x: 0, y: 0, }); My blocks seem to disregard this, I don't fully understand how to make one element "tween" ontop of another one. the values my console log provide seem accurate but it does nothing in draggable/gsap, it only remains on the spot I left it. Any advice? Thanks,
  2. I was overthinking that, without Draggable that's much simpler. Thanks!
  3. @ZachSaucier Thanks, that's exactly what I need. I've been playing around and I think I'm 90% there, do or anyone else see anything wrong with my followMouse() function? It doesn't seem to be getting the right x and y position https://codepen.io/lsencabaugh/pen/VwazjZx
  4. Hi guys, I'm back again. I'm working on the same animation so I figure'd I'd still use this thread. I'm trying to now make it so the ball will constantly "drag" as I hold in during a mousedown event on the dragable ball. Ideally the ball would keep moving towards the point the mouse is "mousedown" on until the user decides to let go. It works well with the high drag Resistance. I've been trying to use the onDrag event but it doesn't know if I'm still holding on to it or not. Any advice welcomed https://codepen.io/lsencabaugh/pen/VwazjZx
  5. That's perfect! Thank you. I will look up those functions (onRepeat, onStart), I did not know they existed
  6. @elegantseagulls Thanks for the tips, I've updated my codepen and I think I'm a lot closer, a problem I'm facing now (I think) is when you are dragging something mid drag it doesn't seem to get the right x and y coord. I'm using Draggable.Get(). Is that what you were suggesting previously?
  7. Hi all, Currently I have a draggable ball that generates a "wave" like circle. I am just starting out with Greensock, I was able to figure out how to emit the wave from the point that I'm dragging, but ideally the wave would be relative to the parent container and stay where they are created. I have a function called CreateNewRing() in my js file which I have set to an interval I'd like to create these rings. If anyone has any tips or examples that might help me figure this out I'd be very appreciative! Thanks
×
×
  • Create New...