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

feat: Implement blend_colors function for color blending #6

Merged
merged 3 commits into from
Nov 25, 2023

Conversation

TechyDaniel
Copy link
Contributor

@TechyDaniel TechyDaniel commented Nov 23, 2023

Description

Add a new function blend_colors in the meshops module to efficiently blend colors of vertices based on grouped indices. This function handles edge cases such as empty color arrays and index groups, and ensures that out-of-bound indices are properly managed. The implementation optimizes the blending process and adheres to project standards for error handling and input validation.

Type of change

Please delete options that are not relevant.

  • [x ] New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.
Please also list any relevant details for your test configuration.

  • [x ] Test suite 1 - for functionality:
    # Case with simple groups and distinct colors
    # Case with a single group
    # Case with groups of 1 element
    # Case with empty colors array
    # Case with empty groups
  • [x ] Test suite 2 - for IndexError

Test Configuration:

Checklist

  • [x ] I confirm that the changes meet the user experience and goals outlined in the design plan (if there is one).
  • [x ] My code follows the style guidelines of this project
  • [ x] I have performed a self-review of my code
  • [ x] I have commented my code, particularly in hard-to-understand areas
  • [x ] I have made corresponding changes to the documentation
  • I have updated any version info, if necessary.
  • [x ] My changes generate no new warnings
  • [ x] I have added tests that prove my fix is effective or that my feature works
  • [x ] New and existing unit tests pass locally with my changes

Task: TECHART-325

Add a new function blend_colors in the meshops module to efficiently blend
colors of vertices based on grouped indices. This function handles edge cases
such as empty color arrays and index groups, and ensures that out-of-bound
indices are properly managed. The implementation optimizes the blending process
and adheres to project standards for error handling and input validation.
@TechyDaniel TechyDaniel self-assigned this Nov 23, 2023
@TechyDaniel TechyDaniel marked this pull request as ready for review November 23, 2023 15:32
Copy link
Collaborator

@Olaf-Wolf3D Olaf-Wolf3D left a comment

Choose a reason for hiding this comment

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

I have some open questions, see comments.

src/readyplayerme/meshops/mesh.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/mesh.py Show resolved Hide resolved
src/readyplayerme/meshops/mesh.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/mesh.py Outdated Show resolved Hide resolved
src/readyplayerme/meshops/mesh.py Show resolved Hide resolved
src/readyplayerme/meshops/mesh.py Outdated Show resolved Hide resolved
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as draft November 25, 2023 02:42
@Olaf-Wolf3D Olaf-Wolf3D marked this pull request as ready for review November 25, 2023 02:42
@Olaf-Wolf3D Olaf-Wolf3D self-requested a review November 25, 2023 02:47
@Olaf-Wolf3D Olaf-Wolf3D merged commit 2c36655 into main Nov 25, 2023
1 check passed
@Olaf-Wolf3D Olaf-Wolf3D deleted the feat/Interpolate-Colors branch November 25, 2023 02:50
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