You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's not possible to help you with your issues without a minimal working codepen or fiddle demonstrating the bugs.
There might be a conflict with locomotive scroll plugin, but it's hard to say without any example. You shouldn't use onAfterResize callback to update your planes positions. You can however use it to log your planes bounding rectangles, that could help you with debugging.
You shouldn't remove the render() method from the gsap ticker. If you wish to switch rendering on and off, you should have a look at the enableDrawing() / disableDrawing() methods.
function destroyPlane() {
gsap.ticker.remove(gsapRender);
for (let i = 0; i < planeElements.length; i++) {
curtainPlane[i].remove();
}
curtainPlane = [];
}
its working fine now, but also
these methods enableDrawing() and disableDrawing() are better way to do so
Thank you for suggestions, thanks for this great library
I've created a template for handling planes with locomotive scroll and facing two issue
[1] when I resize the window Planes are sometime disappear and some time misplaced
[2] since I'm using gsap i've used
gsap.ticker.add(curtains.render.bind(curtains));
for render works fine but how to remove it later from gsap.ticker
gsap.ticker.remove(curtains.render);
but it seems not removing
i'm removing it on destroyPlane function
Code :
Note- i've also update ScrollValues and works fine
scroll.on("scroll", (obj) => {
curtains.updateScrollValues(obj.scroll.x, obj.scroll.y);
});
The text was updated successfully, but these errors were encountered: