1 Commits

Author SHA1 Message Date
Rafael Mendes 934c227774 feat(levels): histogram editor in the properties panel
Selecting a Levels node now shows a visual editor above its sliders: a
histogram of the node's input (256 bins; red, green and blue overlaid for a
color input; scaled to the tallest bin between pure black and white) with
the clipped ranges shaded and the levels transfer curve on top, draggable
input low/mid/high handles under it and output low/high handles under a
black-to-white bar.

Fixes in how Levels is edited: Level in mid is relative to the input range,
and its handle now sits where it acts and moves with the range; the input
low and high handles cannot cross. Parameters bound to inputs or driven by
functions keep their handles locked. Every drag is a graph.node.param
command, one undo step per handle. levels_fn no longer propagates NaN.

Tests cover the histogram, the handle constraints and the remap math; the
snapshots UI test renders the editor. Documented in docs/levels-editor.md.

Clean-room implementation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-03 15:03:08 -03:00