Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plane size to match image size #47

Closed
roomfive opened this issue Jul 4, 2020 · 3 comments
Closed

Plane size to match image size #47

roomfive opened this issue Jul 4, 2020 · 3 comments

Comments

@roomfive
Copy link

roomfive commented Jul 4, 2020

Really amazing work with curtains.js, thank you!

I've been playing with the Multiple planes scroll effect with Locomotive scroll demo, and I was wondering if it's possible for the width and height of each plane to be dictated by the image size. So you'd end up with different sized planes as you scroll the page, as opposed to the same width/height each time?

Thanks

@ajayns
Copy link
Contributor

ajayns commented Jul 6, 2020

Unsure if you mean something else, but the characteristics of each plane is dependent on the size, position of the HTML element. In the particular example you mentioned, checkout the elements with class plane - the WebGL planes are of that size and so changing the size of that element should give you different sized planes.

@martinlaxenaire
Copy link
Owner

Hi @roomfive,

as @ajayns said, you just have to change each plane sizes in CSS to get the desired result. Have a look at that codepen for example: https://codepen.io/martinlaxenaire/pen/GRJOxrO

Cheers,

@roomfive
Copy link
Author

roomfive commented Jul 6, 2020

Great, thank you.

@roomfive roomfive closed this as completed Jul 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants