-
Notifications
You must be signed in to change notification settings - Fork 5
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
Implementation in Gatsby #7
Comments
You can try call |
Thanks for the response! So put |
You can also try:
So when the component unmounts it removes the script and removes the GL context, then when it mounts again it will re-add the script and re-execute the script.
|
Thanks! And Happy New Year! Unfortunately, I've already tried that approach by that doesn't seem to work. |
Sure, if could your code with me I can try and find a way to make it work then explain how I did it and make some changes to this repo to make it work better in multi page contexts. |
Sure thing, here you go: https://github.com/MrUltimate/portfolio-2020 Thanks for all your help! |
I couldn't get your site to run with |
Just sent it to you! |
Thanks, I changed the script so that the fluid sim can be called and started with The only short term solution I can think of is just setting your home page link to an absolute URL like Sorry I couldn't get it working perfectly but I'll try and make this implementation work correctly with page changes soon. |
I'm trying to add this into my GatsbyJS site, however, on every page change, the script getting added again which ruins the performance of the sim. Is there a way to handle that change? Is there a way to perhaps remove the script and then add it back when someone navigates back to the page with the sim?
The text was updated successfully, but these errors were encountered: