Jump to content
Search Community

st3f

Members
  • Posts

    37
  • Joined

  • Last visited

Everything posted by st3f

  1. Hi everybody, I'm struggling a lot with the new vars and params... Now, if I do: var tw = gsap.to([myMapContents, myMapShadows, myMapExtras, myGridClose, myGridFar], {duration:dur, cycle:{x:[deltaX, deltaX*.96, deltaX*.8, deltaX*.6, deltaX*.4], y:[deltaY, deltaY*.96, deltaY*.8, deltaY*.6, deltaY*.4] }, ease:Power2.easeOut, onComplete:moveMapComplete, onCompleteParams:[instance], onUpdate:onTweenUpdate, onUpdateParams:["{self}", instance, dur] } ); like I was was used to with TweenMax, my nice function: function onTweenUpdate(tw, instance, totaltime){ if(instance.onUpdateTween){ instance.onUpdateTween(tw.time().toFixed(2), totaltime); } if(tw.progress() > .8 && !onTweenDrawn){ // if already drawn once, takes no further action if(!instance.isDrawn){ instance.draw(); } onTweenDrawn = true; } } Shout at me that: tw.time() is not a function... So, what I have to write to send a reference of the tween somewhere else? Thank you in advance
  2. Magnifique thank you @ZachSaucier about GSAP3, I didn't switch to it because I see it's in beta. Am I wrong? Should I have to change my links now?
  3. Hi People, I really can't find the 'command'... What if I have a complex staggerTo thing but I want it starts (the whole circus) after n seconds? Thank you
  4. Thanks a lot, Zach, for the kind explanations Ciao!
  5. OMG, it was that easy... Sorry, and thank you 3000 @mikel
  6. Bonjour People, I've just started playing with the CSS plugin. I basically copied and pasted the code in "3D transforms and more CSS..." section "transformOrigin", but... my box is not rotating in perspective. What am I missing? Thank you
  7. st3f

    Draggable scope: argh!

    Yes I did... and, yes, " draggableElem is just a single element ". you are very, very kind, @OSUblake you saved my working sunday Thanks a lot
  8. Hi guys, a very weak coder here, I know, so please help... I have a class creating/handling controls for a html5 video object. I copied somewhere here the draggable code for the scrubber and it works fine when in global javascript, but now... I have, clearly, a conflict of "this"s. // a method of my class setDraggable(){ this.offsetLeft = $('.scrubber').offset().left; this.scrubberWidth = this.screenWidth; TweenLite.set(".progress", {scaleX:0, transformOrigin:"left"}); this.draggableElem = $('.vidcontrols-cursor') Draggable.create(this.draggableElem, { type:"x", trigger:".scrubber", bounds:".scrubber", onPress:function(e) { TweenLite.set(this.target, {x:this.pointerX - this.offsetLeft/* offsetLeft: a class' property...*/}); this.update(); updateProgressBarScale(this); // A class' method :( }, onDrag:function() { // stuff here }, onDragEnd:function(){ // stuff here } }); } It's hours I'm trying to address my class' methods from inside Draggable (using onDragScope, for example) but that's something I can't figure out. Thank in advance
  9. Yes, clearly... Thanks a lot OSUblake
  10. Sorry Guys, I perfectly this is not the right place for that, but I'm sure it's full of Jquery wizards here... and I'm clearly missing something. I don't know (nor found out somewhere, sorry) how to refer to a JS class method from inside this &%/()@, damned jquery.click... (Arrrrgghhhh) Thank you forever thank you class Anthony extends Paul { constructor(data){ super(data); // sets a reference in Pippo this.data.refObj = this; // ref to div this.myDiv = this.data.myDiv; this.content = this.data.content; this.btnlabel = this.data.btnlabel; var p = $('<div>'+ this.content +'</div>'); p.css({'...'}); var bt = $('<div>'+ this.btnlabel +'</div>'); bt.css({ '...' }) /* bt.click(function() { And here, Gentlemen, I'd like very much to call... ...showMe() ! (Somehow) }); */ this.myHtml = p; this.myHtml.append(bt); this.myFadeTime = 0.6; this.showMe(); } } Anthony.prototype.showMe = function(){ // update data in Array //... $(this.myDiv).css('opacity','0'); $(this.myDiv).html(this.myHtml); TweenMax.to(this.myDiv, this.myFadeTime, {opacity:'1'}); }
  11. Hi Guys, just here to say hello and thank you. It's two weeks I'm working on a JS project with a lot of GSAP and... I didn't have to ask anything . All I need is in this forum. Merci!
×
×
  • Create New...