Render only when shared state changes

Add shared-data and bundle invalidation signals, and have handles publish them automatically for SAB and graph mutations.

Document the raw core worker protocol in a dedicated VitePress site and simplify the glTF import and picking example.

Amp-Thread-ID: https://ampcode.com/threads/T-01a01ff8-b91f-724f-8952-f07c6b5042fd
Co-authored-by: Heaust Azure <heaust.azure@gmail.com>
This commit is contained in:
Amp
2026-08-21 04:02:33 +00:00
co-authored by heaust
parent 481d105f19
commit 0e6d7e367c
24 changed files with 761 additions and 101 deletions
+9 -3
View File
@@ -155,7 +155,9 @@ impl Core {
self.data
.borrow_mut()
.delete_object(name, id)
.map_err(JsError::new)
.map_err(JsError::new)?;
self.data.borrow_mut().mark_dirty();
Ok(())
}
pub fn compile_graph(&self, source: &str) -> Result<String, JsError> {
@@ -171,7 +173,9 @@ impl Core {
self.store
.borrow_mut()
.switch(id, gpu, &self.data.borrow())
.map_err(|error| JsError::new(&error))
.map_err(|error| JsError::new(&error))?;
self.data.borrow_mut().loadout_ready();
Ok(())
}
pub fn upload_texture(
@@ -187,7 +191,9 @@ impl Core {
self.store
.borrow_mut()
.upload_texture(name, mip_level, image, gpu)
.map_err(|error| JsError::new(&error))
.map_err(|error| JsError::new(&error))?;
self.data.borrow_mut().mark_dirty();
Ok(())
}
pub fn delete_texture(&self, name: &str) {