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

How do you incorporate a p5 Sketch file with additional .js files #66

Closed
vennsoh opened this issue Nov 27, 2020 · 3 comments
Closed

How do you incorporate a p5 Sketch file with additional .js files #66

vennsoh opened this issue Nov 27, 2020 · 3 comments

Comments

@vennsoh
Copy link

vennsoh commented Nov 27, 2020

There are a few p5 tutorials out there that have additional .js files they use to import in for the p5 experience.
I'm trying to follow this tutorial here: https://thecodingtrain.com/CodingChallenges/115-snake-game-redux.html

Re-creating the exact same thing in React by copy-pasting the code.
But to get it to work with React-p5-wrapper and React in general seems hard?

Here is my demo code.
https://codesandbox.io/s/immutable-wave-z20tv?file=/src/App.js

UPDATE: I think I manage to fix it but I'm getting a ton of console errors which I don't quite understand.

@jamesrweb
Copy link
Collaborator

Hey @vennsoh I checked your REPL but there doesn't seem to be errors there, did you resolve the issue in the end?

@vennsoh
Copy link
Author

vennsoh commented Dec 2, 2020

Ah yes! I've managed to fix it! Thanks.

@vennsoh vennsoh closed this as completed Dec 2, 2020
@jamesrweb
Copy link
Collaborator

No problem @vennsoh, thanks for closing and letting me know! 😄

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