p5.js-website icon indicating copy to clipboard operation
p5.js-website copied to clipboard

[WIP] 2.0 tutorials changes

Open ksen0 opened this issue 8 months ago • 0 comments

Minor changes in tutorials

  • [ ] Ensure mouseX and mouseY examples either expect floating point, or cast to int. For example: https://beta.p5js.org/reference/p5/mousex/ should be updated, also https://beta.p5js.org/tutorials/variables-and-change/
  • [ ] Ensure examples using fill, background and color provide in-range values. For example: https://beta.p5js.org/tutorials/organizing-code-with-functions/
  • [ ] Although preload() code has been removed, phrasing should be updated too https://beta.p5js.org/tutorials/animating-with-media-objects/

These tasks are based on checking

  • [x] https://beta.p5js.org/tutorials/get-started/
  • [x] https://beta.p5js.org/tutorials/setting-up-your-environment/
  • [x] https://p5js.org/tutorials/variables-and-change/ 👀 see notes below
  • [x] https://beta.p5js.org/tutorials/conditionals-and-interactivity/
  • [x] https://beta.p5js.org/tutorials/organizing-code-with-functions/ 👀 see notes below
  • [x] https://beta.p5js.org/tutorials/repeating-with-loops/
  • [x] https://beta.p5js.org/tutorials/data-structure-garden/
  • [x] https://beta.p5js.org/tutorials/animating-with-media-objects/ 👀 see notes below (not 2.0 related)
  • [x] https://beta.p5js.org/tutorials/color-gradients/
  • [x] Custom shapes and smooth curves - (separate issue)

Variables and Change

https://beta.p5js.org/tutorials/variables-and-change/

p5js.org beta.p5js.org
Image Image

mouseX and mouseY are not integer in 2.0: text(mouseX: ${mouseX}, mouseY: ${mouseY}, 20, 20);

Organizing code with Functions

https://beta.p5js.org/tutorials/organizing-code-with-functions/

p5js.org beta.p5js.org
Image Image

Out of bounds color values behavior not consistent with 1.x: https://github.com/processing/p5.js/issues/7714

Animating with media objects

See last sketch in the tutorial: https://beta.p5js.org/tutorials/animating-with-media-objects/ and compare to either 2.0 or latest 1.x: https://editor.p5js.org/ksen0/sketches/GOAfBPCy1 Something with the can sizing is off. It's not a 2.0 issue.

ksen0 avatar Apr 09 '25 21:04 ksen0