remakker Posted October 21, 2020 Share Posted October 21, 2020 I had an empty div with a timeline that animates the background image between 2 images. The images are named 0.jpg and 1.jpg. When I run the html I see that GSAP tries to find images between 0.jpg and 1.jpg like this: GEThttp://127.0.0.1:5500/slideshowa/0.2358.bmp GEThttp://127.0.0.1:5500/slideshowa/0.2417.bmp GEThttp://127.0.0.1:5500/slideshowa/0.2528.bmp GEThttp://127.0.0.1:5500/slideshowa/0.2476.bmp GEThttp://127.0.0.1:5500/slideshowa/0.259.bmp GEThttp://127.0.0.1:5500/slideshowa/0.2645.bmp GEThttp://127.0.0.1:5500/slideshowa/0.2703.bmp GEThttp://127.0.0.1:5500/slideshowa/0.2758.bmp Is this a know bug or is there a way around this? Whenever I change to files with letters, the issue isn't there. Link to comment Share on other sites More sharing options...
Shaun Gorneau Posted October 21, 2020 Share Posted October 21, 2020 Without knowing what you're doing, I feel compelled to say it's not a bug of any kind. Post your relevant code to CodePen and we can give you a better answer. My guess, since what you're looking at in terms of filenames are ascending values, is you're tying the image call to the tween's progress, which goes from 0 to 1. 3 Link to comment Share on other sites More sharing options...
ZachSaucier Posted October 21, 2020 Share Posted October 21, 2020 Hey remakker and welcome to the GreenSock forums. As Shaun says, it's hard to know what the issue is based on the lack of info but it likely has to do with how you're setting the file name. Learn how to create a minimal demo to show the issue here: 1 Link to comment Share on other sites More sharing options...
remakker Posted October 21, 2020 Author Share Posted October 21, 2020 Sorry for including not enough information. Look in the console of the CodePen to see what is going on. Ps: The images I use are 1px x 1px bmp files as a temporary image. See the Pen XWKNWEe by gebruikerr (@gebruikerr) on CodePen Link to comment Share on other sites More sharing options...
Shaun Gorneau Posted October 21, 2020 Share Posted October 21, 2020 It's doing what GSAP does ... tweening a numerical value (which it found in the filename) over a duration. While that's not your intention, it is actually what GSAP does. So, my question is, what effect are you trying to achieve over those 5 seconds? Are you looking to fade one image into another? 3 Link to comment Share on other sites More sharing options...
remakker Posted October 21, 2020 Author Share Posted October 21, 2020 Yes, I'm trying to fade one image over into another, but of course the solution is not really hard. I could just change the filename to have no numbers in it. I tried it and now it is fading as I intended. 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