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

fails with p5.js as "externals" is not present #12

Open
elifares opened this issue Apr 23, 2015 · 2 comments
Open

fails with p5.js as "externals" is not present #12

elifares opened this issue Apr 23, 2015 · 2 comments

Comments

@elifares
Copy link

Hi,
Great library, loving it, thanks for making it. I really want to use the list example you have in this library but I need to implement it with my p5.js project. I believe the processing community created p5 out of Processing.js but I'm not exactly sure how to implement the Guido library into my p5 project.

the Guido.js is in JavaScript but the list.pde is in Processing and I need to manually change it to JavaScript (ex: public void () -> function () ) but how/where do I call the library? It gives me an error when I have import in my sketch.js file.

Please help.

@elifares
Copy link
Author

UPDATE: This is what I did.

  1. I downloaded Guido.js and de.bezier.guido.js and included them in my js folder.
  2. I call them from my index.html folder (ex: <script language="javascript" src="js/Guido.js"></script>)
  3. In my sketch.js file, I translated the list.de file into JavaScript (ex: float -> var, void() -> function() )
  4. The error I am seeing in my browser (Chrome) is: "Guido.js:79 Uncaught TypeError: Cannot read property 'canvas' of undefined"

@fjenett
Copy link
Owner

fjenett commented Apr 30, 2015

Jup. That is a bug that comes from assuming there is Processing.js around it. I'll have a look later, maybe i can hotfix this …

@fjenett fjenett changed the title Using this library with p5.js fails with p5.js as "externals" is not present Apr 30, 2015
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