feat: render programmable 3d scenes cameras and picking
This commit is contained in:
@@ -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>>,
|
||||
|
||||
Reference in New Issue
Block a user