Lux retweetledi
Lux
209 posts

Lux
@lux_designer_
Im building a visual development platform for Mac, Windows and Linux written in Rust! - Lux
Katılım Nisan 2026
134 Takip Edilen8 Takipçiler
Lux retweetledi

Feed a spread into any node in Lux and it automatically processes every element. No loops, no map functions, no iteration code
A Math node that adds two numbers? Give it two spreads and it adds them pairwise. The spreading is invisible and universal
uselux.app/blog/spreads-t…
English

InRange in Lux checks if a value falls between a min and max. Returns true or false. That's it
Wire it to a color switch and things light up when values enter a zone. Wire it to a gate and signals only pass within bounds. Simple node, big results
uselux.app/blog/logic-nod…
English

The Damper node in Lux smooths any value over time. Noisy input goes in, buttery smooth signal comes out
One parameter: smoothing time. Longer means slower response. Zero means passthrough. Dead simple, endlessly useful
uselux.app/blog/animation…
English

Index a spread in Lux with a number bigger than its length and it wraps around. Index 7 of a 5 element spread gives you element 2
No bounds errors. No crashes. Just modular arithmetic making everything feel like an infinite loop of data
uselux.app/blog/spreads-t…
English

Every node in Lux was creating a fresh HashMap for its outputs on every evaluation. 110+ nodes, 60 frames per second, that's a lot of allocations
Pre-allocated the output maps in EvalState. Now they get cleared and reused. Zero new allocations per frame
uselux.app/blog/the-clean…
English

Dragging a wire in Lux was rebuilding the entire overlay scene every frame. Every node, every connection, all redrawn just to move one wire
Now it only redraws the wire being dragged. Same visual result, fraction of the GPU work
uselux.app/blog/the-clean…
English

Lux's node search was allocating a new String on the heap for every character comparison. Every keystroke, every node name, every frame
Switched to comparing slices directly. Same results, zero allocations. The profiler doesn't lie
uselux.app/blog/the-clean…
English

Sequencer node in Lux steps through a list of values on each trigger. Feed it colors and a metro clock for automatic color cycling
Wire it to positions for waypoint animation. It's polymorphic so it works with any type
uselux.app/blog/animation…
English

Hover over any pin in Lux and you get a tooltip showing its name, type, and description. Hover over a node title and you get the full node docs
All pulled from NodeDoc at runtime. Zero extra work per node because the data is already there
uselux.app/blog/editor-po…
English

Every color in Lux's editor comes from a single theme constants file. Node backgrounds, wire colors, selection highlights, pin colors, all of it
Want to retheme the entire editor? Change one file. No hunting through scattered stylesheets
uselux.app/blog/editor-po…
English

Every node in Lux must have docs. Not a suggestion. CI enforces it
Add a node without a description? Build fails. Add a pin without a doc string? Build fails. The compiler literally won't let you ship undocumented nodes
uselux.app/blog/every-nod…
English

Each node in Lux carries a NodeDoc struct. Name, description, category, and docs for every single pin. All defined right next to the node logic
Not in a wiki. Not in a separate file. In the code, enforced by the compiler
uselux.app/blog/every-nod…
English

Lux was deep cloning layer data on every frame. Entire structs copied just to read a few fields
Wrapped it in Arc. Now cloning is O(1), just bumping a reference count. Same data, no copies. Rust makes this kind of fix trivial once you spot it
uselux.app/blog/the-clean…
English

Week one of building Lux ended with 462 passing tests. Not because I love writing tests but because node graphs have so many edge cases you'd lose your mind without them
462 tests. Week one. That's the foundation everything else sits on
uselux.app/blog/week-one-…
English

Clicking overlapping nodes in Lux sometimes selected the wrong one. Hit testing wasn't respecting z-order
Fixed by sorting candidates by layer depth. Topmost node always wins now. One of those bugs that's obvious once you see it
uselux.app/blog/the-clean…
English

The final stage of Lux's render pipeline is called "blit." The Vello scene gets composited onto wgpu's surface texture in one pass
No intermediate framebuffer copies. No extra draw calls. Just one blit from GPU rendered content straight to screen
uselux.app/blog/pixels-on…
English

Lux has 22 pin types. Floats, colors, transforms, meshes, images, spreads, triggers, enums, you name it
Every single one type checked at connection time. The graph won't let you wire a color into a float. Errors caught before anything runs
uselux.app/blog/week-one-…
English




