docs: clarify protocol and document publication contracts
This commit is contained in:
@@ -546,6 +546,7 @@ pub fn snapshot(
|
||||
snapshot_reusing(store, scene, camera, None)
|
||||
}
|
||||
/// 遍历场景并记录字段依赖;如果世界数据未变则复用不可变场景和 BVH,只替换摄像机视图。
|
||||
/// RenderCache 传入同一 Scene3D 的旧场景;仍完整读取当前场景并比较数值,复用并不意味着跳过遍历或沿用旧依赖。
|
||||
pub fn snapshot_reusing(
|
||||
store: &ObjectStore,
|
||||
scene: ObjectRef,
|
||||
@@ -625,6 +626,7 @@ pub fn snapshot_reusing(
|
||||
match kind {
|
||||
NodeKind::Scene | NodeKind::Group => {
|
||||
// 通过 Reader 记录 children 属性引用,items 再验证它确为 ObjectList。
|
||||
// 此处记录的是 owner.children 属性键;items 借用列表 payload,不会给 reader.reads 自动添加列表内容依赖。
|
||||
let list = object_ref(&reader.value(object, "children")?)?;
|
||||
// 逆序压栈保留列表原始遍历次序,每个子出现都继承当前 world。
|
||||
for (index, child) in object_list::items(store, list)?.iter().enumerate().rev() {
|
||||
@@ -891,7 +893,7 @@ pub fn pick(
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
/// 指针拾取的中间结果,保留交点与所属实例信息供 Event/RayHit3D 使用。
|
||||
/// UiBridge 为三维点击分配的零参原生适配器;invoke 才执行拾取并将 RayHit3D/Nil 放进 Event.hit。
|
||||
pub struct PointerPick {
|
||||
// 原生指针目标的托管 Mount,由调用方包装的 captures 保活。
|
||||
pub mount: ObjectRef,
|
||||
@@ -1023,6 +1025,7 @@ pub fn control(
|
||||
return Err(invalid("camera movement exceeds world budget"));
|
||||
}
|
||||
// 位置与 target 逐轴经 NativeContext 写回,变化日志让下一视觉快照观察到更新。
|
||||
// 正交 zoom 分支还会单独写 height;这些是普通属性写入,不构成多字段事务回滚,失败处理由外层 VM 调用路径负责。
|
||||
for (name, value) in [
|
||||
("x", position.x),
|
||||
("y", position.y),
|
||||
|
||||
Reference in New Issue
Block a user