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

p5.sound import issue #23

Closed
qdhoward opened this issue May 6, 2018 · 3 comments
Closed

p5.sound import issue #23

qdhoward opened this issue May 6, 2018 · 3 comments

Comments

@qdhoward
Copy link

qdhoward commented May 6, 2018

Hi. I include import "p5/lib/addons/p5.sound" in sketch.js and I get a compile error Line 21: 'loadSound' is not defined no-undef.
Line 21 is: let song = loadSound("/src/test.ogg");
Is there anything I did wrong?
Thank you

@slin12
Copy link

slin12 commented May 7, 2018

Have you tried p.loadSound?

@qdhoward
Copy link
Author

qdhoward commented May 7, 2018

I have tried everything including p.loadSound, p5.loadSound(import p5 from 'p5'). I give up and decide to use other library. I have to say p5 compatibility with front-end framework is not very good.

@toroduque
Copy link

I had a very similar issue with p5.dom.js. Try importing it from the react-p5-wrapper module folder. It worked for me:

import "react-p5-wrapper/node_modules/p5/lib/addons/p5.dom";

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

3 participants