chore: DRY, engine, effect improvements. #138
Merged
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.
Refactor so that the lighting engine is simplified. Refactored the effects so that there's less repetition.
Note
Refactors lighting engine, effects, and parsers to remove duplication with shared helpers, simplify conflict/processing logic, and expose
is_multiplier_channel.format_effect_for_loggingandpreserve_conflicting_permanent_effects; avoids unnecessary clones; tweaks layer speed handling and effect ordering; simplifies conflict checks and blend-mode compatibility inengine/layers.rs.is_multiplier_channelwhen filtering locked channels; streamlines multiplier key removal on temporary effect completion.is_multiplier_channelfromeffectsand defines it instate.color.rs: refactors HSV→RGB via sector mapping; adds smalllerphelper.fixture.rs: addslayer_suffix; DRYs multiplier keys (_dimmer_mult*,_pulse_mult*) and normalizes RGBu8→f64.state.rs: minor DMX multiplier consolidation and readability tweaks.tempo_aware.rs: adds rate/measure/beat conversion helpers; consolidates duration→rate logic.cycle_progress,phase, andcalculate_color_indices; reuses across color cycle, strobe, chase, rainbow, and pulse; applies crossfade uniformly; simplifies dimmer path.effect_parse.rsandshow.rs: introduce helpers (color normalization, score-time/offset math, sequence duration/loop parsing); replace repeated logic and centralize sequence ref parsing.Written by Cursor Bugbot for commit f467150. This will update automatically on new commits. Configure here.