Jump to content
Search Community

Page preloader with text sliding up 1 by 1

Louienator test
Moderator Tag

Recommended Posts

Hi, I was wondering if there is a way to make the preloader dependent on the internet speed. Alternatively, is it possible to preload the image and JS components while they are still loading, and then display the contents afterward? Also, I'd like the bar to grow horizontally from the center. Once everything is loaded, I want everything to fade out.

Here's an example of an intro from this website where the text slides 1 by 1 vertically: 
https://priyanshsingara.framer.website/

Here's my fiddle:
https://jsfiddle.net/5f1ock0w/1/

Cheers,

Louie V.

Link to comment
Share on other sites

7 hours ago, Louienator said:

preloader dependent on the internet speed. Alternatively, is it possible to preload the image and JS components while they are still loading, and then display the contents afterward?

  1. Working backwards from this question you can add all the code you want to happen in the onComplete callback, right now you just add a class, but your can do what ever you like here. 
  2. This is sometimes called async, defer, lazy loading and this is not a simple task and can become really technical really fast, this is usually something the tool with which you build your website helps with and not something GSAP can do for you
  3. Yeah the tool with which you set this up could give you a value and you then could feed that to the progress value. Instead of window.onload .play you would  then call .onWhatEverIsUpdatingTheLoading .progress(valueYouGetFromThatTool)
7 hours ago, Louienator said:

Also, I'd like the bar to grow horizontally from the center. Once everything is loaded, I want everything to fade out.

Just set transformOrigin: "center center", then it grows from the center

 

Hope it helps and happy tweening! 

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...