processing / processing-website

Repository for the processing.org website
https://processing.org
GNU General Public License v2.0
68 stars 95 forks source link

Make interactive live sketches for Camera Examples #313

Closed SableRaf closed 2 years ago

SableRaf commented 2 years ago

The Camera examples should be made interactive with p5.js

For information on how to make live sketches for examples, please check the README on examples

trikaphundo commented 2 years ago

The Camera examples should be made interactive with p5.js

Hello, I thought this was fixed by my PR #309, before filing it I tested the website locally following these instructions, and made sure they all worked. But now I see none of the new examples in that PR are working, the website just displays an image instead.

What can possibly have happened? Did I conduct the tests wrongly? Should have I built the website following these instead?

The "liveSketch.js" files are in each of the corresponding examples (for instance orthographic), but somehow they are not being loaded.

I am very willing to help fix this, and will be thankful to whoever gives me some clue on what to do/try or what did go wrong.

Edit: I have just checked that the modifications in this Processing examples (.pde files) and its cousins in P5js #311 are not being reflected in running website, not even the changes to the .pde file.

SableRaf commented 2 years ago

Hey @trikaphundo. You are absolutely right, that's my bad. I haven't pushed the changes to the live website yet and somehow forgot that this was already fixed in https://github.com/processing/processing-website/pull/309. Closing this.

trikaphundo commented 2 years ago

Oh ok, I love good endings :). All examples in PR #309 are now working in the new website release.

I checked Scrollbar and Handles as well; the P5js sketches of #311 are included and working, unlike their Processing sketch versions which are not reflected in the Processing code shown in the example pages.

Edit. my local copy of Processing's website exhibited the very same problem, thus @SableRaf may have done the same error as me. The documentation for update examples or adding examples to the website requires

  1. A copy of the processing-examples main branch be next to the processing-website repo.
  2. From within the root of the processing-website repo, run npm run updateExamples

This last script will copy the Processing sketches (.pde files) from processing-examples to their corresponding locations in processing-website; it will actually only update those that already exist in the processing-website repo. I did this in my computer and the problem is solved: the .pde code shown in the Handles and Scrollbar example pages is the same as the .pde code in the processing-examples repo.

SableRaf commented 1 year ago

Was fixed in b33c14b951fad809b17cf6fed49dd26465673c45 thanks for the heads up :)