-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
Multiple Canvas + Locomotive Scroll V5 #118
Comments
Oh and the most important ! As i'm working on Next, I use React-curtains, is it aligned with V8 of Curtains.js ? I believe it's the major cause on why my planes are not updating (I mean, because it's not reactive) Have a nice day ! |
Hi @Ahlecss, well, that's a lot of questions. It's a bit difficult to figure out what you're trying to do exactly, especially without a minimal code example. Let me try to clear things out a bit.
Hope that helps. Cheers, |
Thanks for all your replies !
Have a nice day ! |
Hi !
Thanks for your great library,
That's not really a bug that i'm exposing here, but more like a performance improvement question :
I'm currently running multiple Canvas (3) on the same page, to run different custom shaders.
The main goal is to control their respective drawings and onRender update, only when they are in view (to boost performance).
For precisions : i'm also using Locomotive Scroll V5 beta.
My first idea was to put one canvas in fixed position and fullscreen, and then use plane.relativeTranslate (to the current Loco scroll) in the unique curtains.onRender(), depending on my current Scroll, thanks to that, the canvas will behave like a "view", with the plane moving in the scene and be drawn or not.
It's quite working, but not really as expected : on scroll, the shader is not really moving, but a black rectangle coming from bottom.
Then I thought it was because I had to move the vertexPosition.y. Which could work, but not quite sure if it means my planes outside the viewport would be drawn or not, unless I pair it with plane.relativeTranslate.y update.
Plus, i'm thinking about the unique curtains.onRender(), if I use it, should I put some conditions inside to know what plane should update it's uniforms ? Are if() not too unperformant ? Is there a better way ?
Anyway, do you have some tips, rendering multiple shader for multiple planes ? One canvas or many ? One onRender or many ? If so, what is the best way to do it ?
Thanks !
The text was updated successfully, but these errors were encountered: