For this class, you will be creating an online porfolio of some of your work, which you can show off to your friends and family! This will be hosted on your UW website.
http://students.washington.edu/<UWNetID>/
, replacing <UWNetID> with your own UWNetIDvergil.u.washington.edu
into the Server fieldpublic_html
folder: double-click it to enterimg
folder and create a folder called "project-images"js
folder and then create a folder called "projects"p5.js
file from your desktop into the Cyberduck window to upload it to your js
folderpublic_html
folder and it should look like the following (minus justin.jpg
)
justin.jpg
in the example above)img
folder
img
folder first and drop the image anywhereimg
folder name, making sure that the folder is highlighted when you release your mouseindex.html
fileindex.html
and choose "Edit with > Code"src
field within the img
tag in the HTML to be img/<image name>
, where <image name> is the name of the image file you just uploaded (e.g. <img align=left src="img/justin.jpg">
)height
field within the img
tag in the HTML to adjust the display size of your image (e.g. <img align=left src="img/justin.jpg" height=200>
)Note: More resources can be found at: https://itconnect.uw.edu/connect/web-publishing/shared-hosting/
img
, project-images
, js
, and projects
folders in the correct places.index.html
file to a TA.
html
, head
, body
, title
, and paragraph (p
) tags.projects
folder (inside of js
)<proj name>.js
, where <proj name> is the name of your project (e.g. taijitu.js
)size()
function to createCanvas()
.var
.
Note that definitions of colors (e.g. color(#,#,#)
) should remain untouched.
|
⇨ |
|
setup()
.
|
⇨ |
|
void
, int
) with the keyword function
.
This includes setup()
and draw()
.
|
⇨ |
|
|
⇨ |
|
Array
keyword.
Also note the use of parentheses ()
instead of brackets []
.
|
⇨ |
|
keyPressed()
:
CODED
.UP_ARROW
, RIGHT_ARROW
, DOWN_ARROW
, and LEFT_ARROW
.'k'
, only 'K'
).length
keyword:
|
⇨ |
|
public_html
folder<proj name>.html
, where <proj name> is the name of your project (e.g. taijitu.html
)<html>
<head>
<script language="javascript" type="text/javascript" src="js/p5.js">
</script>
<script language="javascript" type="text/javascript" src="js/projects/taijitu.js">
</script>
</head>
<body>
<h2>PROJECT NAME</h2>
<p>
<b>Description:</b><br>
YOUR DESCRIPTION HERE
</p>
<p>
<b>My Experience:</b><br>
YOUR EXPERIENCE HERE
</p>
</body>
</html>
script
tag is importing p5.js
taijitu.js
in the second script
tag to import the correct javascript file for your projectindex.html
.jpg
or .png
as the file extensionproject-images
folder (inside of img
) in Cyberduck to upload itindex.html
to include the following below all of your other text in the body:
<br><a href="taijitu.html"><img src="img/project-images/taijitu.png" /></a>
taijitu.html
and taijitu.png
to the correct file names for your projectindex.html
using HTML
Make sure your portfolio is properly updated: we will be checking three times during the quarter.
You are encouraged to include as many assignments in your portfolio as you wish, but we will be specifically checking for the ones listed below.
Please be aware that many of the later assignments are quite difficult to convert to p5.js
so ask for assistance early!
We strongly recommend updating your portfolio as you complete assignments so that you don't forget the process and don't have to scramble to do it all at once just before the Updates.
Minimum project set:
Minimum project set:
Minimum project set:
The following webpage is an example you may choose to follow:
index.html
) contains an image of me along with details about myself and why I teach CSE 120
Unfortunately, the Processing --> p5.js transition is messy because the two languages are very different. Inevitably, your p5.js code will break and your project in your portfolio will not display (i.e. the drawing canvas will not appear on the HTML page). Oh no! What can you do?
In the Processing IDE, we had the Message Area, which is the normally-grey bar just below your code. This Message Area turns red if it finds an error in the line of code that your cursor is currently on (see example to the right).
If an error occurs during the execution of your program, then the error message(s) are printed to the Console, which is the black area below the Message Area. There is a similar Console in your browsers that will let you see your error messages in your p5.js projects, too!
Google Chrome:
Mozilla Firefox:
Apple Safari (Mac only):
Error messages show up in red in the Console.
Learning to read the error messages is difficult, as there is often extraneous information contained in the message.
Focus on the messages that show your p5.js file (e.g. taijitu.js:1
) indicated on the right -- the number after the colon indicates which line number the error occurred on.
Some common errors:
size()
function for creating your drawing canvas to createCanvas()
.int
, float
, boolean
, char
, or color
in a variable declaration and change it to var
.void
, int
, etc.) to the keyword function
.{
somewhere in your code..js
) in VS Code through Cyberduck (right-click, "Edit with > Code").