Skip to content
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

Update shape attribute references #6841

Merged
merged 2 commits into from Mar 15, 2024

Conversation

nickmcintyre
Copy link
Member

Preparing references in src/core/shape/attributes.js for the new website. I also took a crack at addressing #5472.

PR Checklist

  • npm run lint passes
  • [Inline documentation] is included / updated

@Qianqianye @davepagurek @limzykenneth

Copy link
Contributor

@Qianqianye Qianqianye left a comment

Choose a reason for hiding this comment

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

Thanks @nickmcintyre. It looks great. Left some minor edit comments!
@limzykenneth and @davepagurek, please feel free to chime in.

src/core/shape/attributes.js Outdated Show resolved Hide resolved
@@ -71,26 +98,75 @@ p5.prototype.ellipseMode = function(m) {
};

/**
* Draws all geometry with jagged (aliased) edges.
* Draws certain features with jagged (aliased) edges.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you share the reason to make the change from 'Draws all geometry' to 'Draws certain features'? It seems make more sense to 'draw geometry' than 'draw features'. If it's important to keep 'certain', how about 'Draws certain geometry'? @nickmcintyre

Copy link
Contributor

Choose a reason for hiding this comment

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

I think the reason for this is that there's no way to turn off antialiasing on lines and shapes in 2D mode, and I think this confuses a lot of users (it's come up in the discord a few times.) In 2D mode, I believe this just affects image scaling in 2D mode, so it actually doesn't affect geometry at all, only images. Somewhat confusingly, this does not affect image scaling in WebGL mode (you have to use an undocumented method on p5.Texture) but does actually affect antialiasing. The situation is unfortunately a bit complicated right now :')

I think the description in this PR does a pretty good job of mentioning the key details quickly.

Copy link
Member Author

Choose a reason for hiding this comment

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

@Qianqianye basically what @davepagurek said. I sketched a few test cases based on #5472 and tried to describe what I saw.

src/core/shape/attributes.js Outdated Show resolved Hide resolved
@@ -172,27 +301,76 @@ p5.prototype.rectMode = function(m) {
};

/**
* Draws all geometry with smooth (anti-aliased) edges. <a href="#/p5/smooth">smooth()</a> will also
* improve image quality of resized images.
* Draws certain features with smooth (antialiased) edges.
Copy link
Contributor

Choose a reason for hiding this comment

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

similar comment as 'noSmooth'
Could you share the reason to make the change from 'Draws all geometry' to 'Draws certain features'? It seems make more sense to 'draw geometry' than 'draw features'. If it's important to keep 'certain', how about 'Draws certain geometry'? @nickmcintyre

src/core/shape/attributes.js Outdated Show resolved Hide resolved
@Qianqianye Qianqianye merged commit 40b19e9 into processing:main Mar 15, 2024
2 checks passed
@nickmcintyre nickmcintyre deleted the ref-shape-attributes branch May 6, 2024 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

None yet

3 participants