rgbscripts/lines.js Enhance RGB script with new properties and performance optimizations#1845
Open
sandinak wants to merge 1 commit intomcallegari:masterfrom
Open
rgbscripts/lines.js Enhance RGB script with new properties and performance optimizations#1845sandinak wants to merge 1 commit intomcallegari:masterfrom
sandinak wants to merge 1 commit intomcallegari:masterfrom
Conversation
- Add new properties: linesDistribution, linesMovement, linesLifecycle, linesPattern, linesBrightnessVariance, linesMovementSpeed - Remove deprecated properties: linesVariability, linesSlide, linesRollover - Implement performance optimizations: * Replace Math.round() with bitwise operations (value + 0.5) | 0 * Replace Math.floor() with bitwise OR (value | 0) * Use bit shifts for division/multiplication (>> 1, << 1, >> 2) * Optimize color channel extraction with cleaner bit masks * Add early returns for common cases * Cache frequently used calculations * Optimize brightness variance and color calculations - Improve code structure and formatting - Add comprehensive property validation - Enhance line lifecycle and movement capabilities - All tests passing (100% success rate)
08617a8 to
99cb699
Compare
Owner
|
Thanks for this. |
Contributor
Author
Yes .. it should be. I am working on several of these.. so hopefully this test case will be useful. |
mcallegari
reviewed
Dec 16, 2025
| algo.linesBias = 0; | ||
| algo.properties.push("name:linesBias|type:list|display:Starting Bias|values:Random,Top,Bottom,Left,Right,TopLeft,TopRight,BottomLeft,BottomRight|write:setBias|read:getBias"); | ||
| algo.linesSlide = 0; | ||
| algo.properties.push("name:linesSlide|type:list|display:Slide|values:None,Up,Down,Left,Right|write:setSlide|read:getSlide"); |
Owner
There was a problem hiding this comment.
You removed "Slide" and "Rollover" so this is not backward compatible.
What about existing projects using those parameters?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Comprehensive enhancement to the lines.js RGB script with new animation properties and significant performance optimizations.
Changes
Testing