Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

elegantseagulls last won the day on May 27

elegantseagulls had the most liked content!

elegantseagulls

Moderators
  • Content Count

    426
  • Joined

  • Last visited

  • Days Won

    6

elegantseagulls last won the day on May 27

elegantseagulls had the most liked content!

Community Reputation

936 Leader

About elegantseagulls

  • Rank
    Advanced Member

Contact Methods

Recent Profile Visitors

3,577 profile views
  1. @GreenSock -- Beat me to it! I just copied the path when I got the post notification.
  2. You could possibly use something like this, and map it out over time as the line moves along the x axis... https://stackoverflow.com/questions/15578146/get-y-coordinate-of-point-along-svg-path-with-given-an-x-coordinate
  3. Does anyone have any experience using registerEffect with React? I'm trying to create/register my effects in my _app.js file, and use them in a component, but am receiving an error on first load: TypeError: gsap__WEBPACK_IMPORTED_MODULE_12__.default.effects.fadeInEffect is not a function I'm thinking this is happening because my app is trying to use the effect before it's registered (it seems to work just fine after initial load). Is there a way to check if the effect exists? Also, is there a way/need to do garbage cleanup for effects? I haven't had the chance
  4. @OSUblake -- Turns out I was waaaaay over complicating. Technical-issue Tuesdays, I guess. @GreenSock, This makes perfect sense! Thank you!
  5. Ok, @OSUblake, I updated the pen slightly so only the red square's timescale is being tweened.... The issue is that the duration of tweens setup in my keyframes animation don't seem to be consistent (like sometimes the timeScale: 10 doesn't last a full second) and it also seems to randomly pause (or possibly drop to timeScale: 0?)—It should only do this after going to timeScale: 10. I'm noticing this across browsers. ... Does that help? https://codepen.io/elegantseagulls/pen/rNmWvdJ
  6. Let me see if I can simplify the demo more. 😅
  7. Hi @Nitro Interactive, Can you provide an example of your setup? React should scope your timelines to each component, so the defaults for the specific timeline should be scoped the same, unless you're setting GSAP's global defaults.
  8. I have an animation that's using registerEffect, to animate some items, and then another registerEffect to animate the timeScale with some keyframes, so I know I'm diving a bit deep here, but am seeing some weird inconsistencies with durations, as well as it randomly pausing for a moment. The pattern should be default speed, fast, stopped, then back to default, however sometimes the fast speed is on a shorter duration than set, and also sometimes it goes from default speed to paused, back to default. Also, the repeatDelay is randomized on repeat. I tried to keep this as simple as possible,
  9. You can animate strokeDashoffset, and all other svg attributes in gsap just as you would any other property. Maybe your target isn't accurate for your animation? also make sure your case is correct strokeDashOffset strokeDashoffset https://codepen.io/ryan_labar/pen/GRmqbpY For fine tuning your strokeDashArray animation, check out the DrawSVGPlugin: https://greensock.com/docs/v3/Plugins/DrawSVGPlugin Also, we don't recommend using ScrollMagic. GSAP has ScrollTrigger: https://greensock.com/docs/v3/Plugins/ScrollTrigger
  10. In next.js you'll likely want to import the TextPlugin via import { TextPlugin } from "gsap/dist/TextPlugin";
  11. Hi @Tonycre8, The className plugin was removed in gsap version 3. More info here: https://greensock.com/3-migration/#className
  12. Since you're using your param as state, you shouldn't need to pass it directly into the function, as it's an easily accessible variable, and since ticker is going to be constantly running, it'll be able to read that without specifically passing it in via (). Another thing to note: unnamed arrow functions don't cleanup nice inside of ticker / event listeners. You'll want to separate your functions if you can and access/cleanup like: gsap.ticker.add(funcName) gsap.ticker.remove(funcName), which is important with apps like react, otherwise you can end up with unexpected results where you're do
  13. So using gsap.ticker.add runs the target function on every 'tick' (usually synced up with requestAnimationFrame). So even if you're running this in vanilla JS you'll see your console.log printing out about 60*/s. Is this not what you are experiencing? Referencing an external function via useEffect (gsap.ticker.add(funcName)) will likely cause the aforementioned re-render because of deps in useEffect. One way to avoid this would be to define your ticker function inside your useEffect.
  14. Pinning is just using position fixed and math to figure out start, end, and top positioning, so there shouldn't be much that isn't compatible, you may need to manually adjust some of the CSS (z-index) manually for deprecated browsers; I don't have any of the devices you mentioned, so not positive as to exactly what you're seeing. You're also starting with position fixed for your header in your CSS, which may (likely could) be creating issues.
×