Comments (3)
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 !
from curtainsjs.
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.
- Except for very specific use cases (such as having multiple webgl layers with HTML content between them), you should always use one and only one canvas and webgl context.
- There's an official example on how to use the lib with a smooth scroll library. I haven't tried Locomotive scroll v5 but there's no reason the concept wouldn't be the same.
- The lib is taking care internally of what plane should or shouldn't be drawn based on frustum culling (see this example and play with the various transform values). If you're messing with the vertices positions in your shader, considering using the drawCheckMargins property.
- It's up to you to decide what various
onRender
callback to use.Plane.onRender
callbacks are useful to update things relative to the plane itself, such as its uniforms or transform values.Curtains.onRender
is just called once at eachrequestAnimationFrame
tick. There's nothing wrong in putting conditional statements in there. react-curtains
should use the latestcurtainsjs
version. If that's not the case, then you could fill a bug in the appropriate repo.
Hope that helps.
Cheers,
from curtainsjs.
Thanks for all your replies !
- I manage to do it on only one canvas, even if I needed in fact multiple webgl layers with HTML content between them (playing on transparency shader), because perf are more important.
- Thanks, Loco works great.
- I understand, but I have one more question : Is there any Raycast-like feature on Curtainsjs ? I would like to fire an event when I hover a plane, but I don't really move the plane, I move the vertexPosition.x, assuming that playing with vertex needs less calculation that moving with plane.relativeTranslation.x, and then call curtains.needRender (and maybe plane.updatePosition ?), is that the case ?
- Thanks for the precise response !
- Same thing !
Have a nice day !
from curtainsjs.
Related Issues (20)
- Multiple Planes issue HOT 1
- when resizing positions of planes misplaced HOT 2
- Creating a new texture or setting the source of an existing one dynamically throws a WebGL render error HOT 1
- reusing a past video texture HOT 5
- Strange behaviour on Safari ping/pong shading flowmap example HOT 4
- WebGL2 Support HOT 2
- Typescript types. HOT 2
- autoResize disabled, but right after refresh, the curtain gets resized HOT 2
- Domain Warping HOT 1
- Planes are missing after resize HOT 3
- Multiple ShaderPasses per Plane HOT 3
- Incorrect sampler name HOT 2
- blocked because of a disallowed MIME type HOT 4
- Copying a texture with different sourceType doesn't work HOT 4
- Make an option for a plane with rounded edges
- ShaderPass transparensy
- error occuring in curtains s
- Planes have unwanted offset when page is refreshed after scroll on mobile HOT 1
- Flowmap resizing HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from curtainsjs.