feat: render programmable 3d scenes cameras and picking
This commit is contained in:
@@ -275,6 +275,23 @@ impl NativeCallable for Method {
|
||||
let mut commands = Vec::new();
|
||||
for command in layout::paint_commands(&node, x, y, Size { width, height }) {
|
||||
let fields = match command {
|
||||
RenderCommand::Scene3D {
|
||||
x,
|
||||
y,
|
||||
width,
|
||||
height,
|
||||
view,
|
||||
} => {
|
||||
let snapshot = cx.allocate(crate::scene3d::PaintView(view))?;
|
||||
vec![
|
||||
("kind", Value::Text("scene3d".into())),
|
||||
("x", value(x)),
|
||||
("y", value(y)),
|
||||
("width", value(width)),
|
||||
("height", value(height)),
|
||||
("scene", Value::Object(snapshot)),
|
||||
]
|
||||
}
|
||||
RenderCommand::Text {
|
||||
x,
|
||||
y,
|
||||
|
||||
Reference in New Issue
Block a user