Jump to content
Search Community

Image sequence animation

Ritesh Malviya test
Moderator Tag

Recommended Posts

Canvas is just an image, and should be treated just like you would a normal image, so you can set the size with CSS or GSAP.

#my-canvas {
  height: 400px;
}

 

gsap.set("#my-canvas", {
  height: 400
});

 

This is the intrinsic size, and should be the size of the images. 

canvas.width = 1158;
canvas.height = 770;

 

  • Like 3
Link to comment
Share on other sites

Sorry, I don't understand what you mean.

 

And I definitely don't think you should be doing all that logic in the render function. You should create your timeline inside the matchMedia functions, and you can use the position paramater and durations to control when/what should happen.

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...