Skip to content

armgit / raea

Public Imported from GitHub
0

Render Anything Engine: tell your AI what to make. Videos, motion graphics, 3D and games as React and TypeScript, rendered on your own GPU. Rust + Bevy, macOS, Linux and Windows.

R3F23c: a still with a camera into a render image steps every frame before it (runtime-scene carries_state), so what a pass drew lasts: a ping-pong's start drawn at frame 0 is there at frame 12

shinyobjectz6a2646b5a571
diff --git a/runtime/scene/src/lib.rs b/runtime/scene/src/lib.rs
index 114ab858..9cfb46f3 100644
--- a/runtime/scene/src/lib.rs
+++ b/runtime/scene/src/lib.rs
@@ -200,10 +200,10 @@ fn bevy_parts(n: &Node3, it: &mut Item) {
}
}
-/// A scene with a <Compute> whose state carries from frame to frame (a file's images, or buffers of its own), so a
-/// still steps every frame before it (raea-runtime-export's scene_frames).
+/// A scene with a <Compute> whose state carries from frame to frame (a file's images, or buffers of its own), or a camera
+/// into a render image (R3F23c: what it drew lasts, a ping-pong's start drawn at frame 0), so a still steps every frame before it (raea-runtime-export's scene_frames).
pub fn carries_state(scene: &[Node3]) -> bool {
- scene.iter().any(|n| (&*n.kind == "Compute" && n.props.get("shader").is_some_and(|s| s.get("file").is_some() || s.get("buffers").and_then(Value::as_object).is_some_and(|b| !b.is_empty()))) || carries_state(&n.kids))
+ scene.iter().any(|n| (&*n.kind == "Compute" && n.props.get("shader").is_some_and(|s| s.get("file").is_some() || s.get("buffers").and_then(Value::as_object).is_some_and(|b| !b.is_empty()))) || (&*n.kind == "PerspectiveCamera" && n.props.get("target").is_some_and(Value::is_string)) || carries_state(&n.kids))
}
/// A frame's scene walked into its parts, each placed in the world.