Repository navigation
Conversation
…poser Settings → Appearance → Home visual takes a Luau script in the format agents use with show_visual and draws it in the room between the blank new-thread composer and the window bottom. - The script is checked with zeron_visual::check off the main thread before it is saved, so a broken script never reaches the home view; its error comes back with the line. Clear removes it. - The setting (`new_thread_visual`) is device-local and omitted from the file when unset. - VisualFrame::from_script runs a script already in hand, with the same runtime as agent visuals (canvases, scenes, shaders). - The shell places it from last frame's composer and column bounds, fades it with the Home selectors, leaves room for the bottom notices, clips it at the terminal, and fades a visual taller than the room out at its bottom instead of cutting it off. - Code fields: a CodeInput key context where Enter breaks the line, and a monospace ComposerInput option. - new-project-fixture takes ZERON_FIXTURE_HOME_VISUAL=<file.luau>.
…omposer Appearance gains a background source, Image or Generative. Generative shows the user's Luau script, whose ui.shader renders at the background's size and paints through the same composer mask, fades, and crossfade as an image. It moves (time, spin, feedback buffers) but takes no input. Both the image and the script are kept, so switching loses neither. - Applying the script checks that it runs and returns a shader without assets, and samples one frame's color for "Match wallpaper colors". Choosing or shuffling an image switches back to it. - Frames render at half the display's density (at most 1600 px on a side), at most 30 per second, one in flight, and only while the background paints; reduced motion and background pause hold a still. Without a GPU the image shows instead. Effects and framing don't apply. - Readiness crossfades only between sources: a live source's frames replace each other in place, including mid-crossfade. - ShaderPlayer, extracted from VisualFrame, renders one shader's frames for agent visuals and the background alike. - ShaderSpec::fade_edges lets a host that masks the frame itself turn the edge fade off. - The script settings card is shared: ScriptCard with a ScriptSpec for the home visual and for the generative background. - The voice stage shows the same background. - new-project-fixture takes ZERON_FIXTURE_GENERATIVE=<file.luau>.
Frames rendered at half the display's density and were capped at 1600 px on the longest side, so on a 1x display a large window stretched the art two to three times and fine detail (halftone dots, neon lettering) went soft. Render at the window's logical resolution instead, capped by area (about 4 MP) so a wide window scales down evenly. 2x displays render as before.
This branch has not been deployed
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.
Builds on the native Luau visuals from #900 to let users put their own art on the new-thread view. There are two new slots, both set in Settings → Appearance:
ui.shaderscript as an alternative to the background image, drawn behind the composer. It moves but takes no input.Summary
Home visual
new_thread_visual(device-local) holds the script. Apply runszeron_visual::checkoff the main thread and saves only if it passes; errors come back with their line. Clear removes it.VisualFrame::from_scriptruns a script already in hand with the same runtime as agent visuals.ComposerInputgains aCodeInputkey context, where Enter breaks the line, and a monospace option for code fields.Generative background
ui.shaderwithout assets, and samples one frame's color for "Match wallpaper colors".Readinesscrossfades only between sources. A live source's frames replace each other in place, including mid-crossfade.Shared pieces
ShaderPlayeris extracted fromVisualFrame. It renders one shader's frames for agent visuals and for the background.ShaderSpec::fade_edgeslets a host that masks the frame itself turn the edge fade off. Mobile and agent visuals keep it on.ScriptCardwith aScriptSpecis the settings card both slots share: code field, Apply, Clear, check errors.new-project-fixturetakesZERON_FIXTURE_HOME_VISUAL=<file.luau>andZERON_FIXTURE_GENERATIVE=<file.luau>.Test plan
cargo test -p zeron-ui --lib -- settings:: composer:: visuals::: 357 passed.-- new_thread_generative new_thread_background_effects settings::tests visuals: 89 passed. It includes the new tests:cargo test -p zeron-visual-gpu -- light_fades_out: a host-masked frame keeps its edges.cargo checkforzeron-ui,zeron-visual-gpu(tests and examples), andzeron-mobile.new-project-fixtureon Xvfb with lavapipe:Need help on this PR? Tag
@codesmith-botwith what you need.