feat: render interactive manuscript from Endor through generic graphics

This commit is contained in:
2026-11-12 10:52:28 +08:00
parent d29a1be329
commit 2715c1ce2c
71 changed files with 3000 additions and 78 deletions
+8 -1
View File
@@ -223,6 +223,11 @@ impl RenderCache {
continue;
}
path.remove(&data_ref);
let pointer_connection = data.subscriptions.iter().any(|&o| {
store
.payload::<crate::event_dispatch::Connection>(o, "Subscription")
.is_ok_and(|s| s.handler.is_some() && s.kind.starts_with("pointer"))
});
let mut protocol_key = String::new();
let mut custom_event = false;
if let Some(definition) = store.type_of(block)? {
@@ -402,7 +407,9 @@ impl RenderCache {
block_id: block.to_string(),
protocol_key,
slots: data.children.iter().map(|c| c.slot).collect(),
interactive: matches!(&data.kind, Kind::Button | Kind::Viewport3D { .. })
pointer_events: pointer_connection,
interactive: pointer_connection
|| matches!(&data.kind, Kind::Button | Kind::Viewport3D { .. })
|| data.click.is_some()
|| click_connection
|| custom_event,