Skip to content

Updated Image Reference Examples on p5js.org to ES6 #3404

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

Merged
merged 4 commits into from
Dec 23, 2018
Merged

Updated Image Reference Examples on p5js.org to ES6 #3404

merged 4 commits into from
Dec 23, 2018

Conversation

duskvirkus
Copy link
Contributor

Fixes - #3387

  • Updated all @examples for @module Image to ES6
  • Changed var to let
  • Changed callbacks to => notation
  • Changed idx to index in two examples to make it easier to comprehend
  • Fixed <code></code> block by changing it to ```javascript``` so it displays correctly

@duskvirkus duskvirkus changed the title Fix #3387 Updated Image Reference Examples on p5js.org to ES6 Dec 17, 2018
* var x, y, d; // set these to the coordinates
* var off = (y * width + x) * d * 4;
* var components = [
* ```javascript
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this will render correctly. have you tested it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I tested it. It currently displays as code but is hard to read because it doesn't have any line breaks you can see that here:

currentget

I chose to match the syntax that I saw in other places throughout the image docs. Here's the suggested change displayed with npm run docs:dev:

newget

I can change it back if you like but I think this is easier to understand.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good. thanks for posting the screenshot.

@lmccart lmccart merged commit da8abf5 into processing:master Dec 23, 2018
@duskvirkus duskvirkus deleted the fix-#3387 branch December 24, 2018 00:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants