-
Notifications
You must be signed in to change notification settings - Fork 166
Add Greetings from p5.js 2.0 tutorial #920
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
base: 2.0
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing, thanks so much for putting this together!
@@ -6,6 +6,7 @@ interface CodeBundle { | |||
htmlBody?: string; | |||
js?: string; | |||
base?: string; | |||
scripts?: string[] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 cool!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Potential alt names: "include" "depedencies" - scripts is also totally ok! But I'm thinking how to distinguish the "script.js" concept which usually refers to the sketch from external includes
--- | ||
title: "Greetings from p5.js 2.0: Animation, Interaction, and Typography in 2D and 3D" | ||
description: "Use new typography and 3D features of p5.js 2.0 to create an interactive postcard!" | ||
category: "2.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe makes sense to put the existing p5.strands tut in the 2.0 category too? I'm also working on the transition guide for this hypothetical/forthcoming category
|
||
A common theme in old postcards is to have large block letters with local imagery showing through. Here's [an example of such a postcard](https://commons.wikimedia.org/wiki/File:Greetings_from_St._Paul,_Minnesota_postcard.jpg) from 1937: | ||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor optional suggestion - alt text <=100 chars: "Postcard with "Greetings from St. Paul, Minnesota" in big letters with local buildings inside them." This is not a hard and fast rule but a UX convention suggested by web accessibility stewards
|
||
 | ||
|
||
 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor/optional "Screenshot of the p5.js Editor version picker showing a list of versions, and the latest 2.0 version selected"
|
||
We've got a nice looking postcard already! But since this isn't going to be a physical postcard--we're going to put it on a website--we want viewers who use screen readers to be able to tell what's on the canvas. | ||
|
||
To do so, we can use `describe()` in setup, and write a short, descriptive string about what we've drawn. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor/optional - thanks for including this! Could also link to https://p5js.org/tutorials/writing-accessible-canvas-descriptions/ for more info?
|
||
We have a small canvas here, what would you do if you wanted to get a high-res image saved? | ||
|
||
Well, first, I'll add `setAttributes({ antialias: true })` after the `createCanvas` line to make sure our edges are nice and smooth. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor/optional: consider switching this sectionand the previous? Most tutorials end in a full copy-able sketch that includes all functionality
@@ -102,6 +102,7 @@ tutorialCategories: | |||
"advanced": "Advanced Topics" | |||
"p5-strands": p5.strands |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this PR should also remove this one, for the time being
I've added a new tutorial for our upcoming SIGGRAPH Labs workshop!
I've added it to a new 2.0 category for now, for content new in 2.0 from 1.x. It's a little weird with just one thing for now, but this is also under the assumption that we'll want to put something in here about migrating from 1.x, and maybe also @ksen0's quilting tutorial too.
This also includes some updates to our UI components:
hideOffscreen
option that uses a live JS embed.Especially as the sketch gets long near the end, embedding the whole thing every time feels a little heavy, but I also want checkpoints where you can see the full sketch source code, so I've left them in for now. In the future it might be nice to have a component that highlights just a subset of the code that could then be expanded to show the whole thing, but that would take a little too much time for this tutorial for now.