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:
83 files changed
+1000
-455
No files matched your search
@@ -44,7 +44,7 @@ mod typography;
|
||||
|
||||
use gpui::{AnyElement, App, Window};
|
||||
|
||||
use crate::script::Step;
|
||||
use crate::step::Step;
|
||||
|
||||
pub struct Page {
|
||||
pub number: u8,
|
||||
@@ -53,6 +53,7 @@ pub struct Page {
|
||||
pub summary: &'static str,
|
||||
pub render: fn(&mut Window, &mut App) -> AnyElement,
|
||||
/// Interactions shot after the static pages.
|
||||
#[cfg_attr(target_family = "wasm", allow(dead_code))]
|
||||
pub script: &'static [Step],
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user