p5 editor, error editor, creating new JS files...

edited March 2017 in p5.js

I'm new to programming and trying to learn by watching Coding Train and other great youtube video's plus reading. I'm trying to mimic Dan Shiffman tools for coding. He uses p5 text editor, for some reason p5 is no longer available. I'm trying to use NotePad++ and Sublime Text3. I've noticed notepad++ script lines need to be written different in order to display in browser so I went to Sublime Text3 editor. Then I noticed neither have an error editor to display errors when they occur. simple errors as using upper - lower case will prevent info/code from displaying in web browser. example: rectMode = (center); lower case "center" does not work it needs to be Upper case. I need help setting everything up correctly. Plus how do I create/save another JS file and have it run. I created file called Sketch2.js but for some reason code will not appear in browser. Plus where do i get or install a error text editor?

Tagged:

Answers

  • Answer ✓

    Center is not the same as CENTER so you should start getting into the habit of typing it correctly for the sake of clarity and sanity. Make it a habit and just keep in mind that coding is case sensitive.

    Shiffman was using brackets as a text editor recently I believe. He even has some videos showing its features and usage.

    If you change the name of the sketch to "Sketch2.js", you need to update your index.html file which should be in the same folder as your sketch. You should go to the p5.js website and check the "Getting Started Tutorial".

    Kf

  • Thank you for the reply. I did this... changing src to sketch2.js - I'll re-evaluate. I also would like to create graphic displays in CodePen, how would I go about doing this. I tried to mimic other ppls code and name the file space-html.html space-css.css space.js example from : https://codepen.io/nodws/pen/pejBNb to see how to create in sublime Text3. but nothing worked. What am I missing or doing wrong.

  • plus BTW: how do I get an Error text editor to display when I have errors

Sign In or Register to comment.