Files
Ely-GPUI-Components/examples/gallery/pages/generative/mod.rs
T
ZacharyZhang-NY a4f101f7b3 T25d Generative: sound and motion
AudioGenerationPlayer shows a generated sound's prompt, model and
length, a bar while it is made, then chat::AudioMessage to play it;
Regenerate and Download wait for it. TTSVoicePicker lists voices with a
sample to play, the chosen one washed with a check, tags dropping below
when narrow. VideoGenerationTimeline lays shots along their time under
a ruler, with posters, placeholders, a playhead and Extend.

AudioMessage's waveform is one Tab stop where Left and Right seek, and
it gives way at 280px. debug::ruler serves the timeline's ruler. A mask
shown to read no longer follows the pointer.
2026-09-26 13:16:42 -04:00

52 lines
1.5 KiB
Rust

mod canvas;
mod panel;
mod results;
mod sound;
use gpui::{AnyElement, App, IntoElement, ParentElement, Window, div};
use super::Page;
use crate::script::Step;
pub const PAGE: Page = Page {
number: 25,
slug: "generative",
title: "Generative",
summary: "Making pictures, sound and video with a model: the prompt and its settings, the queue and what comes back, the canvas, and the models behind them.",
render,
script: SCRIPT,
};
const SCRIPT: &[Step] = &[
Step::DownAt("gen-enhancer", 356.0, 124.0),
Step::UpAt("gen-enhancer", 356.0, 124.0),
Step::Wait(1400),
Step::Shot("suggested"),
Step::DownAt("gen-queue", 426.0, 280.0),
Step::UpAt("gen-queue", 426.0, 280.0),
Step::Wait(400),
Step::Shot("retried"),
Step::DownAt("gen-ab", 181.0, 147.0),
Step::UpAt("gen-ab", 181.0, 147.0),
Step::Wait(300),
Step::Shot("verdict"),
Step::DownAt("gen-canvas", 300.0, 70.0),
Step::DragTo("gen-canvas", 390.0, 220.0),
Step::UpAt("gen-canvas", 390.0, 220.0),
Step::Wait(300),
Step::Shot("masked"),
];
fn render(window: &mut Window, cx: &mut App) -> AnyElement {
div()
.child(panel::panel(window, cx))
.child(results::queue(window, cx))
.child(results::results(window, cx))
.child(results::variations(window, cx))
.child(canvas::canvas(window, cx))
.child(sound::audio(window, cx))
.child(sound::voice(window, cx))
.child(sound::video(window, cx))
.into_any_element()
}