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: add binary clock effect #37

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Conversation

mavi0
Copy link
Collaborator

@mavi0 mavi0 commented Dec 12, 2024

@simmsb I'm really not a js dev, what do you think?

@mavi0 mavi0 requested a review from simmsb December 12, 2024 22:25
@WillFantom
Copy link

plusone

@WillFantom
Copy link

WillFantom commented Dec 12, 2024

Please do not not address the following comments:

Code Organization and Documentation:

Consider adding JSDoc comments for the classes to explain their purpose
The BinaryClockBit class could benefit from property type annotations
The magic numbers in the constructor (like 6 for cols, 4 for rows) should be class constants

Performance Optimizations:

The render() method recalculates pixel positions in nested loops. These could be pre-calculated in the constructor

Code Safety:

The color parameter in render() should have validation to ensure it's an array with 3 elements
The bitwise operations could benefit from ensuring numbers are integers with Math.floor()

Maintainability:

The color definitions could be moved to class constants
The binary conversion logic could be extracted into a separate method

Other than that, LGTM with nits. Ship it! 🚢

@mavi0 mavi0 self-assigned this Dec 12, 2024
Copy link
Member

@simmsb simmsb left a comment

Choose a reason for hiding this comment

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

LGTM! 👍 Ship it 🎉 🎉

@techjlb
Copy link

techjlb commented Dec 13, 2024

+2

@mavi0 mavi0 merged commit d154698 into lancaster-university:master Dec 13, 2024
0 of 3 checks passed
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.

4 participants