Jump to content
Search Community

Rob-Edgehero

Members
  • Posts

    5
  • Joined

  • Last visited

Posts posted by Rob-Edgehero

  1. quick question: 

    Does anyone know how to access the react props inside a draggable create object.

    Draggable.create(ReactDOM.findDOMNode(this), {
           type:"rotation", 
           throwProps:true,
           onRelease: function() {
                console.log(this.props)
           }
    });
    

    i get here the Draggable object on this.

    What is the best way to get this React class its in, instead of the GSAP object?

    • Like 1
  2. Ok thanks!

    Yes im trying to drag the circle, and when its not dragged to spin it forever automatically.

     

    One question still:

    Can i get the rotation degrees from the tweenmax.to rotation?

     

    for example in draggable, i can get it without any problems:

      onDrag: function() {
          console.log(this.rotation)
      }
    

    but i cant find that for tweenmax

  3. Does anyone know the proper solution to this one?

     

    got this for the continues rotation:

            TweenMax.to(ReactDOM.findDOMNode(this), 3, {
                css: {
                    rotation: 360,
                    transformOrigin: 'center center'
                },
                onUpdate: function() {
                    console.log(this.ratio)
                },
                ease: Power0.easeNone,
                force3D: true,
                repeat:-1
            }, 0)
    

    but that does not give me the rotation, so is this even possible with greensock?

  4. Hi everyone,

     

    Im working on a project but got a bit stuck with it. 

    Its a music mixer where im working on, the record should auto rotate 360 degrees after 3 seconds and continues rotating 360deg ( 720 deg total) and that continues infinitely adding more degrees ( or till its paused ).

     

    but when the user drags the record, i want it to continue rotating again after the user lets go, on the degrees the user lets it go.

     

    this is what i got now:

     

    Draggable.create(ReactDOM.findDOMNode(this), {
      type:"rotation", 
      throwProps:false,
      onDrag: function() {
          console.log(this.rotation)
      }
    });
    
    TweenMax.to(ReactDOM.findDOMNode(this), 1, {rotation:110, repeat:-1})
    

    the draggable rotation works that. but the tweenmax is not infinite yet.

     

     

    See the Pen NRoJob by rob-edgehero (@rob-edgehero) on CodePen

×
×
  • Create New...