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

Adding easier to use interface for blend module and different blend modes #1453

Merged
merged 19 commits into from Jan 17, 2020

Conversation

rishabhshuklax
Copy link
Member

@rishabhshuklax rishabhshuklax commented Jan 10, 2020

Fixes #1452
This PR adds support for following blend modes:

  • Multiply
  • Divide
  • Overlay
  • Screen
  • Soft Light
  • Color Burn
  • Color Dodge
  • Grain Extract
  • Grain Merge

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm test
  • code is in uniquely-named feature branch and has no merge conflicts
  • ask @publiclab/is-reviewers for help, in a comment below
  • PR is descriptively titled
  • Insert-step functionality is working correct as expected.

Sample:
Screenshot from 2020-01-10 19-51-10

@rishabhshuklax
Copy link
Member Author

rishabhshuklax commented Jan 10, 2020

@publiclab/is-reviewers @jywarren please review this

@rishabhshuklax
Copy link
Member Author

If anyone has any idea for some other blend mode too I'd be happy to work on it!

@Divy123
Copy link
Member

Divy123 commented Jan 10, 2020

I believe this is some literally great work @blurry-x-face . Blend module goes wowyyy.
What do you say @jywarren ?

@Divy123
Copy link
Member

Divy123 commented Jan 10, 2020

What about the tests? Why are they failing?

@Divy123 Divy123 self-requested a review January 10, 2020 14:41
@codecov
Copy link

codecov bot commented Jan 10, 2020

Codecov Report

Merging #1453 into main will decrease coverage by 0.01%.
The diff coverage is 12.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1453      +/-   ##
==========================================
- Coverage   66.64%   66.62%   -0.02%     
==========================================
  Files         128      129       +1     
  Lines        2659     2661       +2     
  Branches      426      428       +2     
==========================================
+ Hits         1772     1773       +1     
- Misses        887      888       +1
Impacted Files Coverage Δ
src/util/getImageDimensions.js 20% <0%> (+4.61%) ⬆️
examples/lib/defaultHtmlStepUi.js 10.98% <0%> (ø) ⬆️
src/util/isGif.js 20% <20%> (ø)

@rishabhshuklax
Copy link
Member Author

What about the tests? Why are they failing?

I've fixed the problem please re-review @Divy123

Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

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

Not a compulsory suggestion but would you like to add some docs about the different blend modules in the modules.md file? Or at least add links to say Wikipedia sources about the blend modes.

@rishabhshuklax
Copy link
Member Author

@harshkhandeparkar I have added link to the source in the Module.js.
I'll add some more reference and details of blend modes in the module.md

docs/MODULES.md Outdated Show resolved Hide resolved
src/modules/Blend/Module.js Outdated Show resolved Hide resolved
src/modules/Blend/info.json Outdated Show resolved Hide resolved
@rishabhshuklax
Copy link
Member Author

@jywarren @harshkhandeparkar Can you please review this

docs/MODULES.md Show resolved Hide resolved
Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

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

Awesome!

@jywarren
Copy link
Member

Oh goodness, i had missed this! It's really amazing!!!! 🎉 🎉 Great work!!!

b1 = p.get(x, y, 2),
a1 = p.get(x, y, 3);

const blends = {
Copy link
Member

Choose a reason for hiding this comment

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

Fantastic!

Copy link
Member Author

Choose a reason for hiding this comment

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

😄

@jywarren jywarren merged commit c22c6c7 into publiclab:main Jan 17, 2020
@jywarren
Copy link
Member

🎉 🙌 😄

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.

Adding easier to use interface for blend module.
4 participants