T44d Web · Gallery builds for wasm32: one story per section by URL, themed by the host

The gallery's entry runs natively or, on wasm32, from a wasm_bindgen start
through gpui_web, single-threaded with WebGL2 fallback. ?page, ?story and
?theme choose what shows; an unknown one fails in the page and the log.
set_theme switches the mode later. Pictures load from ELY_GALLERY_ASSETS.
scripts/stories.py writes examples/gallery/stories.json from the pages.
This commit is contained in:
ZacharyZhang-NY committed 2026-09-29 19:16:41 -04:00
1 parent a03df0987c
commit 48c7b09d8d
83 files changed
+1000 -455

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ mod sound;
use gpui::{AnyElement, App, IntoElement, ParentElement, Window, div};
use super::Page;
use crate::script::Step;
use crate::step::Step;
pub const PAGE: Page = Page {
number: 25,
+4 -4
View File
@@ -1,4 +1,4 @@
use std::{path::Path, time::Duration};
use std::time::Duration;
use ely_gpui_component::{
data_display::BeforeAfter,
@@ -12,7 +12,7 @@ use gpui::{App, IntoElement, ParentElement, SharedString, Styled, Window, div, p
use crate::{
probe::probe,
ui::{keep, section, set},
ui::{keep, picture, section, set},
};
fn jobs() -> Vec<Job> {
@@ -137,8 +137,8 @@ pub fn results(window: &mut Window, cx: &mut App) -> impl IntoElement + use<> {
.child(
BeforeAfter::new(
"gen-compare",
Image::new("gen-compare-before", Path::new(asset!("atrium-before.jpg"))).size_full(),
Image::new("gen-compare-after", Path::new(asset!("atrium.jpg"))).size_full(),
Image::new("gen-compare-before", picture(asset!("atrium-before.jpg"))).size_full(),
Image::new("gen-compare-after", picture(asset!("atrium.jpg"))).size_full(),
)
.w(px(420.))
.h(px(280.)),