Jump to content


  • Posts

  • Joined

  • Last visited

About d11202

d11202's Achievements

  1. Hi Jack Thanks for your speedy reply. Yep, that makes sense.
  2. Hello Greensock world! Using the Greensock 1.19.1 npm download: I'm polishing up my Greensock skills in the world of ReactJS/ES6/Webpack. I've read similar posts on this forum which have been helpful but perhaps outdated. I'm a bit unsure how to get the subscription-paid plugins working with the npm download, for example on line 4 where I import TweenMax I was hoping to add ScrambleText or other plugin name, however this doesn't work. Is there any up-to-date documentation that covers ES6 import of the subscription plug-ins? // The following import works for TweenMax, // however if the ScrambleTextPlugin.js is placed in the npm_modules/gsap // directory alongside TweenMax.js it doesn't import. import { TweenMax, ScrambleText } from gsap Many thanks in advance
  3. Hi Diaco Thanks for your reply. I was aware .set was an option, although I was interested to understand why the CSS transform:translate had stopped working. What's going on behind the scene that prevents this and are their any CSS/JS options open to facilitate this? Thanks
  4. Hi Can anyone tell me if there's a 'best practices' way of stopping a throw animation. Basically I want an element to be able to catch something that a player has thrown using the Draggable / ThrowPropsPlugIn. If the element catches the thrown object, the thrown object would stop short of the distance it would have glided (been thrown). Many thanks in advance
  5. Hi PointC ...just one last thing. Are you or anyone else able to say why the jQuery reference in my question would not change the CSS value of the Draggable element? onClick:function() { console.log("clicked", this.target.id ); $( "#"+this.target.id ).css("background-color","#333333"); }
  6. Hi I'm learning how to use Draggable. I have some divs styled as coloured boxes with some basic text in. <div id="answer1" class="box-answer"><span class="text">a ratio</span></div> I use the following Javascript to facilitate the div being Draggable and then to change the colour of the box when it receives an onClick. I'm not sure why, but it doesn't seem to work Draggable.create(".box-answer", { type:"x,y", bounds: "#container", throwProps:true, edgeResistance:0.35, onClick:function() { console.log("clicked", this.target.id ); $( "#"+this.target.id ).css("background-color","#333333"); }, onDragEnd:function() { console.log("drag ended"); } }); If anyone can show me how I change the CSS properties of a Draggable element after receiving a mouseEvent I'd be very grateful. Many thanks in advance
  7. The slideshow is really nicely done. Is there any example code / tutorials on how you would rotate slides 3 dimensionally: http://slides.com/greensock/html5-banners#/ Many thanks in advance
  8. Hi Using TimelineMax.staggerTo I would like to calculate the x position of where a box would end up at runtime. So: var i = 0; var tlmx = new TimelineMax(); tlmx.staggerTo( $('.box-answer'), 0.25, { x:getXposition(), y:200 }, 0.25 ); function getXposition() { console.log('getXposition: i:', i); var posX = i * 200; i++; return posX; } With the code above the function only gets called once. I thought it would be called with each iteration of $('.box-answer'). Help greatly appreciated. Thanks