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