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

New shadow module added #816

Closed
wants to merge 2 commits into from
Closed

New shadow module added #816

wants to merge 2 commits into from

Conversation

niravasher
Copy link

working on issue #806

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
  • PR is descriptively titled
  • ask @publiclab/reviewers and @publiclab/is-reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@welcome
Copy link

welcome bot commented Feb 23, 2019

Thanks for opening this pull request!
There may be some errors, but don't worry! We're here to help! 👍🎉😄

@harshkhandeparkar
Copy link
Member

Nirav. I have a few suggestions.

  1. Please refer to this to create a meta-module.
  2. Also build the dist files by running grunt build.
  3. Clear the cache in the browser.

@niravasher
Copy link
Author

After doing grunt build, the shadow module is visible on my local. I changed info.json and Module.js to create a new metamodule, on module load I get this error

image-sequencer.js:72130 Uncaught TypeError: Cannot read property 'format' of undefined
at image-sequencer.js:72130
at Image.img.onload (image-sequencer.js:9605)

I think something is wrong with info.json , I am updating this PR, please have a look at the code @harshkhandeparkar

@harshithpabbati
Copy link

@niravasher please mention @publiclab/is-reviewers for reviewing it.

@harshithpabbati
Copy link

Please checkout as your travis-ci failed...
Thanks

@harshkhandeparkar
Copy link
Member

I think you will have to improve upon the gradient module:

  1. To choose the direction of gradient. It can be anything like horizontal, vertical, radial(maybe), both horizontal and vertical (somehow).

  2. Percentage of starting grading to ending gradient. Maybe the gradient can go from being x% dark to y% dark. E.g 70% to 60%.

You can try implementing these features 😊. Thanks

@niravasher
Copy link
Author

niravasher commented Mar 3, 2019

Gradients for issue #822 right @harshkhandeparkar ?

@harshkhandeparkar
Copy link
Member

@niravasher what I meant was that limitations of the gradient module will only create a shadow in a single direction and single intensity in this shadow module. So I felt like the gradient module can be improved upon by implementing the changes I suggested. Thanks.

@niravasher
Copy link
Author

Ok, looking into it @harshkhandeparkar

@jywarren
Copy link
Member

jywarren commented Mar 5, 2019

I wonder if we tried the sequence i suggested before, like:

I could imagine creating a black mask by turning darkness to max, then blurring that mask. It seems we would also need to increase the image size to make space for the shadow.

So

  1. brightness all the way dark
  2. blur that dark image
  3. expand canvas
  4. overlay original image over blurred darkened image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in-progress module New Module idea
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants