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
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("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/src/test.ogg");
Is there anything I did wrong?
Thank you
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.
Reacted by abidabdelaziz, Calum Gunn, Neil Symington and Ee Venn Soh
Activity
slin12 commentedon May 7, 2018
Have you tried
p.loadSound?qdhoward commentedon 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 commentedon Jul 26, 2018
I had a very similar issue with p5.dom.js. Try importing it from the
react-p5-wrappermodule folder. It worked for me:import "react-p5-wrapper/node_modules/p5/lib/addons/p5.dom";