feat: render programmable 3d scenes cameras and picking
This commit is contained in:
@@ -232,6 +232,13 @@ pub fn project(
|
||||
(mount.width - inset.horizontal()).max(0.0),
|
||||
(mount.height - inset.vertical()).max(0.0),
|
||||
))
|
||||
} else if matches!(node.kind, UiKind::Viewport3D { .. }) {
|
||||
Some(Rect::new(
|
||||
mount.x + inset.left,
|
||||
mount.y + inset.top,
|
||||
(mount.width - inset.horizontal()).max(0.),
|
||||
(mount.height - inset.vertical()).max(0.),
|
||||
))
|
||||
} else if node.clip_children {
|
||||
let border = node.border;
|
||||
Some(Rect::new(
|
||||
@@ -249,7 +256,7 @@ pub fn project(
|
||||
let rect = view.rect(rect);
|
||||
let rect = [rect.x, rect.y, rect.width, rect.height];
|
||||
child_clip = Some(clip.map_or(rect, |clip| intersect(clip, rect)));
|
||||
if mount.canvas_viewport {
|
||||
if mount.canvas_viewport || mount.scene3d_viewport {
|
||||
mount.viewport_clip = child_clip;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user