-
Notifications
You must be signed in to change notification settings - Fork 9
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
When I set transparent=true it is not actually transparent #5
Comments
Have you tried to put a wallpaper behind it? I think the transparent effect is made for if you have content underneath the canvas element that you want to be visible. In your example it doesn’t look like you have anything behind the canvas which is why it looks like this :). Maybe I misunderstood. How have you placed the canvas element in relation to your other elements? |
I put the content for an example but when the canvas is under the content it stops working at all but if I increase the z index of the canvas it covers everything with a checkered background I also added for canvas position fixed top 0 left 0 so it would always be on the page but it didn't change anything Maybe you can make it so that this background with cells is not there?) |
I don’t completely understand what you want to accomplish. Do you want to have a wallpaper behind the fluid simulation (that is what the transparent effect is mostly made for) or are you trying to have it on top of all react components. One problem with the canvas element is that it cant be a parent element, only a sibling element. I can try to look at the code for the transparency when I have time, but it may be that your issue is unresolvable |
Yes I want to use it on top of other components to create an effect like on this site https://lusion.co/ |
I see, to get the canvas working when it is behind other components you need to pass the mouse events from that component to the canvas. In regards top having the canvas in front, I don’t know how to have components behind the canvas be visible since the transparent effect is mostly meant for having a wallpaper behind as far as I understand. lusicon.co was a very impressive and cool website :) |
On lusion website this cursor effect is under all, but above other canvases, how to achieve this? |
I don't know how they did it or what tools they used |
I came to the conclusion that this effect is achieved by applying a fluid shader to PlaneGeometry in THREE.js, in my case it will be react three fiber, |
I am busy with my own projects right now, but good luck with learning three.js! I am gonna close this issue now. Hopefully you can make your website work the way you want to :) |
@reverseSosa I have encountered the same problem as you. Have you solved it? |
I want to use this as a cursor effect throughout my website, so I import it into my Next js RootLayout, but the transparent true creates a background with cells(
The text was updated successfully, but these errors were encountered: