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
+18 -1
View File
@@ -68,9 +68,26 @@ fn decode(
}
let x = number(store, command, "x")?;
let y = number(store, command, "y")?;
let color = text(store, command, "color")?;
let kind = text(store, command, "kind")?;
let color = if kind == "scene3d" {
String::new()
} else {
text(store, command, "color")?
};
let result = match kind.as_str() {
"scene3d" => {
let snapshot = object(store.get_attr(command, "scene")?)?;
RenderCommand::Scene3D {
x,
y,
width: number(store, command, "width")?,
height: number(store, command, "height")?,
view: store
.payload::<crate::scene3d::PaintView>(snapshot, "immutable 3D paint snapshot")?
.0
.clone(),
}
}
"roundedRect" | "strokeRoundedRect" => {
let width = number(store, command, "width")?;
let height = number(store, command, "height")?;