Jump to content

vektor

ShockinglyGreen
  • Content Count

    19
  • Joined

  • Last visited

Everything posted by vektor

  1. Found the fix! This animation is within a Magento 2 project, which uses requirejs for everything, I switched from jQuery's $(function() {}) doc ready to require js 'domReady!' and the bug is not happening anymore So now looks something like require(['jquery', 'TweenMax', 'CustomEase', 'domReady!'], function ($) { // ANIMATE πŸŽ‰ });
  2. Hi, there's a strange bug I've been coming across and not sure how to fix, it only happens very occasionally, but does always happen eventually if you keep refreshing. Seems like it's something to do with a wrong 'xPercent' calculation? I'm animating every svg elements y position from bottom to top, fine Then I am animating some elements to 'wiggle' their x and y positions. Sometimes the x axis seems to be wrong and they move much too far I originally thought the problem was because I was trying to animate the wiggle from the start, at the same time as moving everythings 'y' position. But I delayed any 'y' position animations until the first 'move up' animation was finished Funnily enough I can't seem to get the codepen to reproduce this bug... Making me think maybe it's network related, something trying to calculate before the svg is fully loaded...? Anyone seen something similar before, any idea what's going on? Is there a less troublesome way to achieve the same effect? I tried using 'x' instead of 'xPercent' but this made a jump in the animation and also xPercent is preferable as the image resizes a quite lot Thanks πŸ™ƒ
  3. Note I copied and pasted line 10 and it contains an invisible "\u00bb" character that may break things
  4. Still an issue for me unfortunately Update: Applied the style to the element specifically (I had a couple of spans inside a h2) and it helps! πŸŽ‰ ( Still a little jump but luckily not very noticeable :)
  5. vektor

    SEO and GSAP

    One of the sites I am working on has fade in animations and uses css .animin{visibility:hidden} and then TweenMax.set(".animin", { visibility:"visible" }); to stop flash of content before the javascript is loaded. I can confirm that this text is currently NOT being indexed by Google. (The other non-animated pages are fine) I will try adding a <noscript> style to see if that helps! Will post the results Anyone else had experience with this issue? Update: test1: I added the <noscript> style and now googling text from the page in quotes returns the correct page. The only thing is that there is no bold highlighted copy in the SERP preview, it just shows the meta description. Not sure of the implications of this? test2: Removing the .animin class from the text returns the correct page when searched, no SERP bold preview text I'll wait and see if test1 results change Update2: I can confirm that text that has been 'splittexted' is not being indexed. I have used this, I assume that will help onComplete: function(){$splitTxt.revert()} Update 3: Any SplitText text is still not indexed in Google, even after an onComplete:revert(). Anyone else come across this issue before?
  6. @OSUblake awesome 😎 Ooh, "_gsTransform", nice!
  7. πŸ’šπŸ’šπŸ’šπŸ’šπŸ’šπŸ’š
  8. Aha! Yes fixed thanks How can I get this updated non codepen only version?
  9. Ah silly, yes I missed the 'codepen only' bit Fixed here
  10. Cool Did some more tests, removed the tweens from the loop in case that was causing an issue. Also tried removing tspans, still the same result ( codepen below )
  11. Hi, I have a small issue with the Scrambletext plugin using the wrong lengths for the text ( in an SVG ) Most of the strings start scrambling with too many characters, it also still happens if I define the 'text' parameter Can't work out why? Is there a workaround to force a specific length? Thought it may be to do with the tspans, but I experimented with removing some and it didn't seem to make a difference πŸ€”
  12. πŸ‘πŸ˜ŽπŸ‘ If I use that modified Scrambletext.js in my project I get this error I will keep using my manual loop anyway in this case, as I am now also checking for classes and applying other animations accordingly
  13. πŸ˜„πŸ˜„ Cheers guys, getBBox() is what I was looking for !! The cloning method is clever too, wouldn't quite translate to my real life project though The forum post on SVG gotchas about BBox was very helpful πŸ‘
  14. Great, thanks! So that works if I rebuild the scene using multiple svgs / elements, which will work for some things However one of the SVGs I need to animate has lots going on so it won't really be possible to recreate it like this So the technique of css absolute positioning won't affect anything inside the SVG So my main issue seems to be: How to center / set absolute coordinates of the svg elements inside the svg using GSAP? Is there a simple way to do this, I'm thinking due to the nature of SVG maybe there isn't..? If that's the case I can just manually pass in the correct relative x,y values needed, or make some changes to the svg file itself πŸ‘Ύ My not-working codepen below
  15. When I did this on an SVG ( haven't tried with HTML ) using stagger, it used the content of the first text element for all of them So I had to change this tl.staggerTo($totals, 2, { scrambleText: { chars: "0123456789", ease: Linear.easeNone}}, 0.2, "label"); to this $totals.each(function(i, el){ tl.to(el, 2, { scrambleText: { chars: "0123456789", ease: Linear.easeNone}}, "label+=" + i*0.2); })
  16. Cool! FYI, docs still say 'text' is required and doesn't mention this default behaviour https://greensock.com/ScrambleTextPlugin πŸ™ƒ
  17. Hi, I have researched and tried various things but can't work out if there is a way to translate svg elements from 'absolute' coordinates? i.e. translate a bunch of svg elements all starting from the center, and finishing at their actual position So in the codepen, I would like to tween all the chickens from the black box to their actual positions ( on the black lines ) Currently, I put in the x,y value of the black box to tween from, but the chickens use this as a relative x,y I could work out the correct relative x,y value to tween from, but in the real project there are many elements that may change slightly Am I missing something obvious? Thanks
  18. Great, I think I'll start with trying the modifier plugin method, as I have other more complex animations that may need this approach. Also the other method of creating a new tween at the same progress(), I'd have to get my head around how this would work with Scrollmagic scenes. I assume I would have to also destroy and re-create the scrollmagic scene and re-add the timeline. But don't know if there's a way to add an in progress tween... So using modifiers is sounding a bit nicer at the moment.. I just worked out what I was doing wrong with modifiers method, I was doing this, which was making it jump to the values tl.to($logo, 0.8, {scale: 0.6, y: 1, modifiers: { y: function(y){return $(window).width() >= 1000 ? -10 : 40}}, repeat: -1, yoyo: true }, "start"); I needed to do this to make it tween properly tl.to($logo, 0.8, {scale: 0.6, y: 1, modifiers: { y: function(y){return $(window).width() >= 1000 ? y * -10 : y * 40}}, repeat: -1, yoyo: true }, "start"); Here's the working Codepen CSS vars thing looks cool, unfortunately my project needs to work in IE11 too so will have to think about that one Great info, Cheers!!!
  19. Hi! I'm a little stuck on a little issue πŸ‘Ύ I am trying to make a simple responsive variable in a tween. At different screen sizes, the box needs to move up by varying amounts ( does not work with yPercent ) It was suggested somewhere on this forum that className would work for this, but the css values seem to 'cache' to whatever rules applied at the screen size on page load. i.e. On the codepen the red box should move to the top of the grey bar, and < 1000px turn black, > 1000px turn green. It does this if you run the pen at either size, but if you resize live the initial css value is always used. Is there an easy way around this? Or a simpler method? I also tried using modifier plugin, as suggested elsewhere, but had similar results ( I couldn't find the modifiers plugin js link to make another codepen, commented out in my demo ) I'm guessing some sort of destroy / rebuild the timeline on resize would do the trick, but would be nice if I didn't have to do that? ( maybe not relevant but I am attaching it to a scrollmagic scene, which triggers the shrink / expand nav logo on scroll ) Cheers Greensock you're awesome!