feat: render programmable 3d scenes cameras and picking

This commit is contained in:
2026-11-10 23:19:26 +08:00
parent 040b779f5f
commit ad2c01bc29
33 changed files with 2463 additions and 42 deletions
+20
View File
@@ -81,6 +81,20 @@ impl UiNode {
.all(|(a, b)| Arc::ptr_eq(a, b))
};
match (&self.kind, &other.kind) {
(
UiKind::Viewport3D {
width: a,
height: b,
view: c,
controls: g,
},
UiKind::Viewport3D {
width: d,
height: e,
view: f,
controls: h,
},
) => a == d && b == e && c == f && g == h,
(
UiKind::CanvasViewport {
width: a,
@@ -180,6 +194,12 @@ impl UiNode {
#[derive(Debug, Clone, PartialEq)]
pub enum UiKind {
Viewport3D {
width: f32,
height: f32,
view: Arc<crate::scene3d::View>,
controls: bool,
},
Scene2D {
positions: Vec<[f32; 2]>,
children: Vec<Arc<UiNode>>,