refresh: stack al día (vello 0.7 / wgpu 27 / parley 0.6) + motor 3D voxel
Re-sincroniza las fuentes desde el monorepo (estaba en vello 0.5/wgpu 24 y con la estructura vieja de eventloop) y suma el 3D: - bump del workspace a vello 0.7 / wgpu 27 / parley 0.6, + accesskit 0.24 / accesskit_winit 0.33 / vello_hybrid 0.0.9. - nuevos crates: llimphi-3d (voxels ray-march + mallas en un depth compartido, montable dentro de un View 2D vía set_viewport+scissor) y llimphi-voxel (world-gen, personajes, director de escenas) + shared/foreign-vox (puente .vox). - README: sección "Not just 2D — a 3D voxel engine" + GIF (docs/llimphi_voxel.gif). - excluido modules/allichay (arrastra deps fuera del alcance del front-door). - cargo check --workspace: verde. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
[package]
|
||||
name = "llimphi-widget-hero"
|
||||
version.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
authors.workspace = true
|
||||
publish.workspace = true
|
||||
description = "llimphi-widget-hero — entrada dramática con curva de overshoot para elementos destacados (modal, dialog, página recién montada). NO es shared-element transition real (esa requiere un registry retenido en el runtime); es la firma cinética que Flutter Hero usa al aterrizar."
|
||||
|
||||
[dependencies]
|
||||
llimphi-ui = { workspace = true }
|
||||
llimphi-theme = { workspace = true }
|
||||
@@ -0,0 +1,52 @@
|
||||
//! `llimphi-widget-hero` — shared-element transitions estilo Flutter Hero.
|
||||
//!
|
||||
//! El runtime de Llimphi tiene un [`HeroRegistry`](llimphi_ui::llimphi_compositor::HeroRegistry)
|
||||
//! retenido entre frames: si la misma `key` aparece en un rect distinto entre
|
||||
//! dos frames consecutivos, el runtime interpola `transform` para que el nodo
|
||||
//! "vuele" del rect anterior al actual. Este widget es el envoltorio canónico
|
||||
//! que marca al `child` como hero con la `key` indicada — la app no necesita
|
||||
//! tocar `View::hero` a mano si compone con esto.
|
||||
//!
|
||||
//! Mantenemos las firmas previas (`hero_view`, `hero_quick`) para no romper
|
||||
//! callers. Antes envolvían sólo con `animated_inout` (fade); ahora componen
|
||||
//! `hero` + `animated_inout` para que un caller que reusa la misma `key` entre
|
||||
//! rutas obtenga el fly real **y** el fade de aterrizaje juntos.
|
||||
|
||||
#![forbid(unsafe_code)]
|
||||
|
||||
use llimphi_ui::llimphi_layout::taffy::prelude::{percent, Size, Style};
|
||||
use llimphi_ui::View;
|
||||
use llimphi_theme::motion;
|
||||
|
||||
/// Envuelve `child` como hero: si la misma `key` aparece en otro rect en un
|
||||
/// frame siguiente, el runtime interpola `transform` para volar entre las dos
|
||||
/// posiciones; el fade-in/out de `animated_inout` cubre el aterrizaje
|
||||
/// (`motion::DRAMATIC`, 480 ms). `key` debe ser estable entre rebuilds.
|
||||
pub fn hero_view<Msg: Clone + 'static>(key: u64, child: View<Msg>) -> View<Msg> {
|
||||
View::new(Style {
|
||||
size: Size {
|
||||
width: percent(1.0_f32),
|
||||
height: percent(1.0_f32),
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
.children(vec![child])
|
||||
.hero(key, motion::DRAMATIC)
|
||||
.animated_inout(key, motion::DRAMATIC)
|
||||
}
|
||||
|
||||
/// Hero "rápido" — variante con `motion::SLOW` (320 ms). Para elementos
|
||||
/// destacados pero menos protagónicos (un toast importante, un panel
|
||||
/// que se monta).
|
||||
pub fn hero_quick<Msg: Clone + 'static>(key: u64, child: View<Msg>) -> View<Msg> {
|
||||
View::new(Style {
|
||||
size: Size {
|
||||
width: percent(1.0_f32),
|
||||
height: percent(1.0_f32),
|
||||
},
|
||||
..Default::default()
|
||||
})
|
||||
.children(vec![child])
|
||||
.hero(key, motion::SLOW)
|
||||
.animated_inout(key, motion::SLOW)
|
||||
}
|
||||
Reference in New Issue
Block a user