Question on using standard code and the P5 library code

edited February 2017 in p5.js

I really like P5... I know a little on how to use canvas without P5 and I have trouble using the P5 code and the standard code in the same canvas files. Is it an easy thing to do where you use the P5 library sometimes and other times you use the standard code? I can't get the CDN to work.



  • edited February 2017 Answer ✓

    Dunno exactly what's being asked here. :-/
    But for CDN, assuming your sketch is named as "sketch.js", your "index.html" could be like this:

    <script src=></script>
    <script src=sketch.js></script>

    Take a look at this online sketch sample: O:-)

  • edited February 2017

    I've never seen that code before. I'm totally new. I thought it would be like bootstrap and on the P5 website under "start" I was trying to download that stuff in there like we do with bootstrap. Is that not how we do it? I guess this is different then bootstrap. How do you know this stuff?

  • edited February 2017

    We can always choose to download p5.js library and use it locally rather than get it remotely via some CDN URL:


    <script src=p5.js></script>
    <script src=sketch.js></script>
Sign In or Register to comment.