Daniyarkz Posted February 4, 2022 Share Posted February 4, 2022 Hello! Please tell me what needs to be done to keep the blocks moving indefinitely vertically? I tried to adjust the vertical change of blocks, but they update when they reach the height of one word, and not the height of the block See the Pen MWOjpgR by Daniyar01 (@Daniyar01) on CodePen Link to comment Share on other sites More sharing options...
Solution akapowl Posted February 4, 2022 Solution Share Posted February 4, 2022 Hello @Daniyarkz It looks to me like you tried to re-write the horizontalLoop helper function from the docs to make it work vertically? I'm not sure it would be as easy as that, as I saw @GreenSock craft another version of a helper function specifically for vertical looping in this thread. Here is one way you could utilize it to fit the logic you were trying to implement in your example. I'm not sure if this is the best way to do it, but it works. Maybe it will help. Happy tweening! See the Pen LYORWLW by akapowl (@akapowl) on CodePen Edit: And just now I saw the comment in the code, that the 'speed can be positive or negative (in pixels per second)'. So this actually gets quite a bit easier in the end. See the Pen RwjGVWq by akapowl (@akapowl) on CodePen 4 Link to comment Share on other sites More sharing options...
Daniyarkz Posted February 5, 2022 Author Share Posted February 5, 2022 12 hours ago, akapowl said: Hello @Daniyarkz It looks to me like you tried to re-write the horizontalLoop helper function from the docs to make it work vertically? I'm not sure it would be as easy as that, as I saw @GreenSock craft another version of a helper function specifically for vertical looping in this thread. Here is one way you could utilize it to fit the logic you were trying to implement in your example. I'm not sure if this is the best way to do it, but it works. Maybe it will help. Happy tweening! Edit: And just now I saw the comment in the code, that the 'speed can be positive or negative (in pixels per second)'. So this actually gets quite a bit easier in the end. Thank you so much! You helped a lot! 2 Link to comment Share on other sites More sharing options...
Dooshan Posted March 4, 2023 Share Posted March 4, 2023 On 2/4/2022 at 12:13 PM, akapowl said: Hello @Daniyarkz It looks to me like you tried to re-write the horizontalLoop helper function from the docs to make it work vertically? I'm not sure it would be as easy as that, as I saw @GreenSock craft another version of a helper function specifically for vertical looping in this thread. Here is one way you could utilize it to fit the logic you were trying to implement in your example. I'm not sure if this is the best way to do it, but it works. Maybe it will help. Happy tweening! Edit: And just now I saw the comment in the code, that the 'speed can be positive or negative (in pixels per second)'. So this actually gets quite a bit easier in the end. Can I get some help? I need a third column that goes down, as first? (JS confuse me) Here is a forkec codepen: See the Pen BaOZLNV by stdusan (@stdusan) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted March 6, 2023 Share Posted March 6, 2023 @Dooshan do you mean like this?: See the Pen GRXEadV by GreenSock (@GreenSock) on CodePen 1 Link to comment Share on other sites More sharing options...
Dooshan Posted March 6, 2023 Share Posted March 6, 2023 6 hours ago, GreenSock said: @Dooshan do you mean like this?: That's it! Thanks. 1 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