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.

plan::composition reads the words in a loop (no closure copied from elsewhere)

shinyobjectz40757526f8e6
diff --git a/runtime/lod-plan/src/plan.rs b/runtime/lod-plan/src/plan.rs
index a035054a..644b6f55 100644
--- a/runtime/lod-plan/src/plan.rs
+++ b/runtime/lod-plan/src/plan.rs
@@ -15,7 +15,12 @@ static READ: Mutex<Option<(PathBuf, Option<SystemTime>, HashMap<String, u8>)>> =
/// The composition a command was given: its first word naming a .tsx or .jsx file (`raea render EDIT.tsx ...`).
pub fn composition(words: impl IntoIterator<Item = String>) -> Option<PathBuf> {
- words.into_iter().map(PathBuf::from).find(|w| w.extension().is_some_and(|x| x == "tsx" || x == "jsx"))
+ for w in words {
+ if w.ends_with(".tsx") || w.ends_with(".jsx") {
+ return Some(PathBuf::from(w));
+ }
+ }
+ None
}
/// The plan's levels for the composition this process was asked to render, read from its own command line: a render's