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.

raea aa607870a

shinyobjectz615382313299
diff --git a/docs/r3f.feature b/docs/r3f.feature
index 2bdcf6b5..cf25c901 100644
--- a/docs/r3f.feature
+++ b/docs/r3f.feature
@@ -68,10 +68,11 @@ Feature: React Three Fiber both ways: an R3F scene drawn by raea, a raea composi
Then engine/shape-web compiles core/shape to wasm (tools/shape-wasm.sh, 2.6 MB) and loadShapes() brings it in:
the solid's own triangles, the same as raea's engine meshes
And until it loads, a solid waits (it isn't drawn as something else)
- And each public release from 0.1.0-canary.3 carries the module, so an app needn't build Rust:
- tools/release-web.sh attaches raea_shape_web.js and raea_shape_web_bg.wasm (and raea-web's raea_web.js and
- raea_web_bg.wasm, with SHA256SUMS) to the GitHub release, at
- https://github.com/shinyobjectz/raea/releases/download/vVERSION/raea_shape_web.js. GitHub serves them as
+ And the public repository's releases carry the module, so an app needn't build Rust: tools/release-web.sh builds
+ raea_shape_web.js and raea_shape_web_bg.wasm (and raea-web's raea_web.js and raea_web_bg.wasm, with SHA256SUMS)
+ from a commit and attaches them to its GitHub release: each engine release from 0.1.0-canary.3 (tag vVERSION),
+ and a pre-release web-SHA for a public commit between them (SHA the public commit's short hash), at
+ https://github.com/shinyobjectz/raea/releases/download/TAG/raea_shape_web.js. GitHub serves them as
downloads (no CORS), so an app serves the two files itself and calls loadShapes("/raea_shape_web.js"), or
imports the glue and passes the module: loadShapes(await import("./raea_shape_web.js"))
diff --git a/sdk/r3f/README.md b/sdk/r3f/README.md
index 241b236d..12edfe43 100644
--- a/sdk/r3f/README.md
+++ b/sdk/r3f/README.md
@@ -31,8 +31,9 @@ loadShapes(await import("./raea_shape_web.js")); // solids, Text3D: from the rel
Its camera, tone mapping (raea's default, TonyMcMapface, drawn with Bevy's own table), fog, environment and effects
become the canvas's. Without React, `Scene3d` (`@raea/r3f/three`) draws a raea page into any three.js scene.
-The shape module, `raea_shape_web.js` and `raea_shape_web_bg.wasm`, is attached to each GitHub release from 0.1.0-canary.3
-(`https://github.com/shinyobjectz/raea/releases/download/vVERSION/raea_shape_web.js`). Serve the two files with
+The shape module, `raea_shape_web.js` and `raea_shape_web_bg.wasm`, is attached to the GitHub releases: each engine
+release from 0.1.0-canary.3 (`vVERSION`) and a `web-SHA` pre-release for public commits between them
+(`https://github.com/shinyobjectz/raea/releases/download/TAG/raea_shape_web.js`). Serve the two files with
your app: GitHub sends them as downloads, so a page can't import them from there.
What only raea's engine draws (WESL and WGSL shaders, Bevy components and resources, volumetric fog) isn't three.js's
diff --git a/sdk/video/src/media.tsx b/sdk/video/src/media.tsx
index cb285e87..dde04e1e 100644
--- a/sdk/video/src/media.tsx
+++ b/sdk/video/src/media.tsx
@@ -183,7 +183,8 @@ export function Audio(props: AudioProps) {
const rate = props.playbackRate ?? 1;
if (rate > 0 && (startFrom + Math.max(0, frame) * rate) / fps >= asset.seconds) return null;
}
- const attrs = useMediaAttrs("Audio", props, asset ? asset.src : (props.src as string));
+ const file = asset ? asset.src : (props.src as string);
+ const attrs = useMediaAttrs("Audio", { ...props, src: file }, file);
if (attrs["data-ended"]) attrs["data-volume"] = 0;
if (asset) {
attrs["data-generate"] = asset.kind;