Skip to content
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

without web pack how it is be used #10

Closed
bernikishore opened this issue May 24, 2020 · 3 comments
Closed

without web pack how it is be used #10

bernikishore opened this issue May 24, 2020 · 3 comments

Comments

@bernikishore
Copy link

bernikishore commented May 24, 2020

fluid-init.js file not found in my local. it shows error
my component cant find this js file

rsz_screenshot_from_2020-05-24_15-47-05

@x8BitRain
Copy link
Owner

This isn't really a normal plug and play React component, this is just an example of how you can use it in React, please look how it works in the following example.
https://github.com/x8BitRain/react-webgl-fluid/blob/master/src/components/fluid.jsx

@bernikishore
Copy link
Author

Yeah its fixed now.

Facing this issue by using router

it works fine home page : http://localhost:3000/
but i navigating to ther page like http://localhost:3000/services

then again i click home page it return below error

Uncaught SyntaxError: Identifier 'canvas' has already been declared

@x8BitRain
Copy link
Owner

Yeah unfortunately there's a problem when using this with React apps with routes, the script can't easily be loaded or unloaded dynamically, I'm not sure if this is a limitation of WebGL or if it's just the way the script was written, this appears to be the same issue as here: #7

I don't know how to fix this because this repo was just meant to be a demonstration of how this can be used in React with a simple Single Page Application but didn't consider if it would work on a react app with routes. So apologies but I will close this issue and reopen it again if I find a fix for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants