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.

font-missing: render_said lives with the page's not_applied, so the export crate stays under its 2,000 lines

shinyobjectz8b1cef58d5c2
diff --git a/Cargo.lock b/Cargo.lock
index 74687353..c87da896 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -16200,6 +16200,7 @@ dependencies = [
"blitz-traits",
"color",
"parley",
+ "raea-core-facts",
"raea-core-wire",
"raea-gpu-device",
"raea-sys-filters",
diff --git a/runtime/export/src/lib.rs b/runtime/export/src/lib.rs
index 5a1a5794..8ab7b600 100644
--- a/runtime/export/src/lib.rs
+++ b/runtime/export/src/lib.rs
@@ -44,7 +44,7 @@ pub use render::*;
mod review;
mod run;
pub use run::*;
-pub use raea_sys_page::not_applied;
+pub use raea_sys_page::{not_applied, render_said};
mod scene;
pub use scene::{USAGE as SCENE_USAGE, cli as scene_cli};
@@ -67,19 +67,6 @@ pub(crate) struct Sound {
/// `render --manifest PATH` (the CLI's; render_bundle keeps its signature for the iPhone): where render.json goes.
static MANIFEST: std::sync::Mutex<Option<PathBuf>> = std::sync::Mutex::new(None);
-/// What `raea render` says once its frames are out: the fonts the page asked for and didn't have (#174) as warnings,
-/// printed and counted with its findings (raea-app-direction's `rendered` keeps them in the manifest), and the note of
-/// what else it didn't apply (#34), returned for the render to print.
-pub fn render_said() -> Option<String> {
- let fix = "load it with @font-face (a staticFile font), install it, or name a family that's there";
- let fs: Vec<raea_core_facts::Finding> = not_applied::fonts_missing().into_iter().map(|says| raea_core_facts::Finding::new("font-missing", raea_core_facts::Level::Warn, says, "raea render").fix(fix)).collect();
- for f in &fs {
- eprintln!("raea: {}", f.line());
- }
- raea_core_facts::finding::said(&fs);
- not_applied::said()
-}
-
/// The manifest, its folder made first (2D stills write it before their frames): the composition's length in frames
/// (whatever was rendered of it; raea check --quick samples by it, #86), boxes as drawn, findings, sounds, and whether
/// it drew 3D (an export in layers draws the 3D in the layer under the page, docs/layers.feature LA2a).
diff --git a/systems/page/Cargo.toml b/systems/page/Cargo.toml
index f7201ccc..f6370a27 100644
--- a/systems/page/Cargo.toml
+++ b/systems/page/Cargo.toml
@@ -29,6 +29,8 @@ raea-gpu-device = { path = "../../gpu/device" }
# CSS filters on the GPU
raea-sys-filters = { path = "../filters" }
serde_json = "1"
+# what a render says once its frames are out, as findings (render_said: #174's missing fonts)
+raea-core-facts = { path = "../../core/facts" }
# text layout as Blitz lays it out (its parley, B0d); the faces are raea-sys-fonts'
parley = { version = "=0.12.0", default-features = false, features = ["std"] }
# an iframe's HTML parsed by Blitz
diff --git a/systems/page/src/lib.rs b/systems/page/src/lib.rs
index 363e83d2..6bded8b6 100644
--- a/systems/page/src/lib.rs
+++ b/systems/page/src/lib.rs
@@ -22,6 +22,20 @@ pub use skipped::wait_drawn;
/// a page's loads (raea-sys-page-net: FileNet, FrameNet, the page's fetch, the image decoder)
pub use raea_sys_page_net as net;
pub use blitz_dom::not_applied; // what the page asked for and didn't get, said once when a render ends (#34)
+
+/// What `raea render` says once its frames are out: the fonts the page asked for and didn't have (#174) as warnings,
+/// printed and counted with its findings (raea-app-direction's `rendered` keeps them in the manifest), and the note of
+/// what else it didn't apply (#34), returned for the render to print.
+pub fn render_said() -> Option<String> {
+ let fix = "load it with @font-face (a staticFile font), install it, or name a family that's there";
+ let fs: Vec<raea_core_facts::Finding> = not_applied::fonts_missing().into_iter().map(|says| raea_core_facts::Finding::new("font-missing", raea_core_facts::Level::Warn, says, "raea render").fix(fix)).collect();
+ for f in &fs {
+ eprintln!("raea: {}", f.line());
+ }
+ raea_core_facts::finding::said(&fs);
+ not_applied::said()
+}
+
/// Blitz's extension points as Bevy resources (S6d)
pub mod providers;
pub mod widgets;