Vincent D Posted November 26, 2020 Share Posted November 26, 2020 Hi! I'm doing a module where the words are sliding and need to always be at the same speed even if they have a different length. I managed to get very far but I'm stuck at the very end (I think), where I can't calculate the delay for when the words wrap. What I know is that the first line needs a delay of around0.8 and the second one needs a delay of around 1.225. How does that delay works? Because I can't have hardcoded numbers since the size will change. Thanks in advance 😄 Here's a link to an image showing the problem : https://pasteboard.co/JCa7H2P.png See the Pen NWRKBMg?editors=1010 by d00td00t (@d00td00t) on CodePen Link to comment Share on other sites More sharing options...
akapowl Posted November 27, 2020 Share Posted November 27, 2020 Hey @Vincent D Heads Up: I genuinely feel bad for posting this, and you should probably not rely on this at all, because I actually have no basis for explaining to you why this works. I tried to wrap my head around how to calculate the delay, but ended up with hammering in wild guesses, and that is one of them (that to me myself actually doesn't make sense at all why it would work like that). See the Pen bc6b7feeb76599ba0718421d707c300c by akapowl (@akapowl) on CodePen The dimensions and padding being different than yours, is just related to me trying to break this - and I didn't get there - so hey, that's something 😅 Until maybe someone else comes along, to offer more profound help on that you could just take a look on it - and maybe try breaking it yourself. Cheers. 1 1 Link to comment Share on other sites More sharing options...
Vincent D Posted November 27, 2020 Author Share Posted November 27, 2020 Thanks you sooooo much! I really need this, now I will try to understand it because it bugs me not to understand. You gave me the key for it and I'm really thankful for it!! 😁 Link to comment Share on other sites More sharing options...
akapowl Posted November 27, 2020 Share Posted November 27, 2020 Just now, Vincent D said: Thanks you sooooo much! I really need this, now I will try to understand it because it bugs me not to understand. You gave me the key for it and I'm really thankful for it!! 😁 Remember, that I said the following 1 hour ago, akapowl said: I genuinely feel bad for posting this, and you should probably not rely on this at all, because I actually have no basis for explaining to you why this works. I tried to wrap my head around how to calculate the delay, but ended up with hammering in wild guesses, and that is one of them (that to me myself actually doesn't make sense at all why it would work like that). So I really wouldn't call this 'the key for it' or the best starting point for getting an understanding of anything. Link to comment Share on other sites More sharing options...
Vincent D Posted November 27, 2020 Author Share Posted November 27, 2020 Hahaha yes I know, but I just found out that the 10 for the delay is actually the "original" time. So if you change variable to another number, you need to change that number for the delay too. Edit: Or create another variable ^^ 1 Link to comment Share on other sites More sharing options...
akapowl Posted November 27, 2020 Share Posted November 27, 2020 Oh, you're right. That makes perfect sense. I was wondering the most why I had to be using the '10' and at the same time, why I didn't have to factor in the time in all of that. 😅 When you look at something for too long, I guess... See the Pen 4fafc7d728f9eaaec82f28c5b5bf04ad by akapowl (@akapowl) on CodePen 3 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now