Jump to content

PointC last won the day on May 26

PointC had the most liked content!


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by PointC

  1. I didn't see anything with a green background either. You mentioned a (bg) and you do have a div with id of #bg, but it looks like it has a gray background. It doesn't currently show because the left and top positions are not set. It doesn't have anything to do with the Morph plugin. If you change your CSS, it will show correctly. #bg { background-color: #666666; position: absolute; width: 100%; height: 100%; left:0; // this was missing top:0; // this was missing } Hopefully that helps. If that wasn't what you were referring to, some more details and a simplified demo would be great. Happy tweening.
  2. Hello OSUblake Welcome to the GreenSock forums. Could you please make a reduced demo for us.... hey wait a minute. Sorry, I got confused as you so rarely start a topic. I think that's a pretty cool idea and could come in quite handy. We certainly see a lot of questions about sliders around here and this could make those quite a bit easier. I'll give a +1 to this idea. I'm anxious to hear what Sir Jack of the House Doyle has to say.
  3. That's happening because of the transform of the path inside the mask. The mask hasn't moved, but the path inside it has. Simply remove that transform and you'll be all good to go. http://codepen.io/PointC/pen/JKGezz Happy tweening.
  4. Hi phillip_vale Your pen had some errors so I just made a new one for you. http://codepen.io/PointC/pen/QEyxLY/ Hopefully that helps a little bit. Happy tweening.
  5. You're very welcome. Glad to hear you're enjoying GSAP. This is an incredible community of helpful people so please don't hesitate to post any additional problems or questions. Reduced demos always appreciated. Happy tweening.
  6. The 'i' is the index of that element. You can use 'i' or 'index' or almost anything you like really, but most of the time you'll see those two. The 'element' is the DOM element that is part of the jQuery object. It's what 'this' will be referring to. We don't actually need them to make this work. You could change the code slightly and get the same result: // change line 1 to this $(".icon").each(function() { // change line 11 to this $(this).hover(makeItWork, makeItWork) Here's some good info that will explain it in detail: https://api.jquery.com/each/ Hopefully that helps. Happy tweening.
  7. Hi Sloan Thrasher Welcome to the GreenSock forums. That's a good question. camelCase should be used for all the hyphenated properties. You just drop the hyphen and make the first letter of the second word uppercase. So font-size becomes fontSize, background-color becomes backgroundColor etc. GSAP can animate any numeric property and can set non-animatable properties. Sounds like you found autoAlpha. That is a combination of opacity and visibility. When you use autoAlpha and you set it to 0, the element is automatically set to visibility:hidden. Handy for many situations, but you can use opacity if you like. scale is just scale if you want uniform scaling or you can use scaleX or scaleY as well. You'll find a lot of great information in the docs for the CSSPlugin http://greensock.com/docs/#/HTML5/Plugins/CSSPlugin/ Hopefully that helps a little bit. Happy tweening and welcome aboard.
  8. Hi ohem Just change the morph target to the path name inside the clip-path instead of the clip-path id. Once I did that, it all worked fine. // change this .to("#clipper", 1, {morphSVG:".smoothCircle"}, "endIntro") //to this .to("#clip", 1, {morphSVG:".smoothCircle"}, "endIntro") Happy morphing.
  9. Yeah - there's a lot going on in there. Carl is absolutely correct about the 360 problem. If you change line 206 to this: .to(spinitemstep5, 1, {rotation:"+=360", autoAlpha:1, delay:0.2, repeat:2, transformOrigin:"center center"}) // I didn't look through the whole thing, but anywhere else you have 360, you'd want to change to +=360 it works fine for me. I think the FF problem is coming from the redundant scripts you're loading in CodePen. You're loading TweenMax and TimelineMax. Once I switched your pen to load only TweenMax and jQuery it seems to work fine in FireFox for me. Happy tweenng.
  10. Hi cpshop Welcome to the GreenSock forums. I think this blog post can help you. Lots of great info about perspective: http://greensock.com/css3/ Happy tweening.
  11. Hi phillip_vale You're on the right track with jQuery each(). This will create a separate timeline for each of the icons that can easily play/reverse on hover. $(".icon").each(function(i, element) { var tl = new TimelineMax({paused:true, reversed:true}), desc = $(this).find(".desc"), graphic = $(this).find(".graphic"), shadow = $(this).find(".shadow"); tl.from(desc, 0.5, {ease:Power2.easeInOut, autoAlpha: 0}, "hover") tl.to(graphic, 0.5, {ease:Power2.easeInOut, y: 10}, "hover") tl.from(shadow, 0.5, {ease:Power2.easeInOut, scale: 0, autoAlpha: 0, transformOrigin: "center"}, "hover"); $(element).hover(makeItWork, makeItWork) function makeItWork() { tl.reversed() ? tl.play(): tl.reverse(); } }); In this solution, we use the same function on hover over/out and either play or reverse the timeline depending on its current state. Here's a fork of your pen with the solution I've listed above. http://codepen.io/PointC/pen/yJYwgz/ Hopefully that helps. Happy tweening.
  12. I tested it for you on a couple machines and it looks perfect. I can't reproduce your pixel error in any browsers.
  13. Hi hiytrebla Welcome to the GreenSock forums. That's pretty strange. Could you please make a quick CodePen so we can test it live ? http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/ Thanks and happy tweening
  14. Hi nickLoffer Welcome to the GreenSock forums. You can use onComplete for the timeline and/or the tweens. Here's a simple example: http://codepen.io/PointC/pen/VjvxzP/ Happy tweening.
  15. Hi atelierstudios Welcome to the GreenSock forums. I looked at your pen, but I was a bit confused by your question. I'm not seeing any 'Step 5' to click. I only see Step 1 and Step 2. When I click those, the animation seems to spin correctly. I see the little circle rotate around the outside ring each time I click. Could you give us a bit more information or make sure you're seeing the problem in the CodePen? Thanks.
  16. I get the same results as Blake. Also on Win 10 Chrome - nothing. FF - sporadically. Edge - works each time. Edit: Windows 7 results IE 11 seems fine FF - worked a few times Chrome - nothing
  17. Hi Sam I'm not sure I completely understand your scenario, but you can kill() a tween or set up a new one that overwrites the old. You could also feed variables into it via a window resize event. Without seeing some code, it's hard to say the best way to achieve your goal. If you could please create a CodePen for us, there are a lot of great people around here that can give you some answers. http://greensock.com/forums/topic/9002-read-this-first-how-to-create-a-codepen-demo/ Thanks and happy tweening.
  18. Those darn code gremlins are everywhere. No problem. Let us know if there are additional issues. Happy tweening.
  19. Hi quintonjason I exported your pen and tested it locally with no problems. Are you getting any console errors? I assume you're not seeing the warning about a CodePen only file? Kind of tough to say for sure. Maybe a typo in the path? When are you loading the scripts? At the bottom of the page? In an onload event? Can you post a screenshot of your code? Thanks.
  20. Doh! That's right - now I remember that. I sometimes do a docs search and get 0 results even though I know it's in there.
  21. I'm not sure if it's in the docs or not. I first read about it in a forum post, but a quick search of the docs doesn't yield any results for me. I'm sure Jack or Carl can let us know if it's in there or not. In the meantime, a similar question was asked and this post may help you: http://greensock.com/forums/topic/9211-need-help-with-properties-in-gstransform-object/ Happy tweening.
  22. PointC

    CSS plugin bugs

    That is good to know. I personally always use camelCase, but I see quite a few forum questions and CodePens like the one above that use hyphens and they usually seem to work fine so I was curious about it.
  23. Hi phillip_vale The easiest way to do that is alternate play/reverse of the timeline on click. Here's a fork of your pen with that solution: http://codepen.io/PointC/pen/XKbEBQ/ Happy tweening.
  24. Width and height are no problem for a mask or clip-path. Scale is a whole different matter. Here's a pen showing two circles. One revealed by a mask and the other by a clip-path. http://codepen.io/PointC/pen/MewvjM/ You'll see that scale will actually work in some browsers, but is not the way to go for cross-browser support. It's best to stick with width/height and x/y to animate masks and clip-paths. https://developer.mozilla.org/en-US/docs/Web/SVG/Element/mask If you'd like to skip the masks and clip-paths, you can also animate the viewBox for some nice reveals and animations. I wrote about that in the SVG Gotchas thread here: http://greensock.com/forums/topic/13681-svg-gotchas/?p=57502 Hopefully that helps a little bit. Happy tweening.