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
+17
View File
@@ -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,