Test complete scenario anchors against real Scene geometry
This commit is contained in:
@@ -1121,6 +1121,10 @@ fn in_machine(p: &Project, id: Id, machine: Id) -> bool {
|
||||
#[path = "../../../harness/experiments/behavior-layout-scene-20260912/mod.rs"]
|
||||
mod behavior_layout_scene_experiment;
|
||||
|
||||
#[cfg(test)]
|
||||
#[path = "../../../harness/experiments/behavior-anchor-plan-20260912/mod.rs"]
|
||||
mod behavior_anchor_plan_experiment;
|
||||
|
||||
struct BoxItem {
|
||||
id: Id,
|
||||
rect: Rectangle,
|
||||
@@ -1332,6 +1336,8 @@ impl Scene {
|
||||
let mut y = if scenario { 148. } else { 120. };
|
||||
scene.occurrences(p, owner, scenario, &lane_x, &mut y, 0);
|
||||
scene.size.height = (y + 45.).max(210.);
|
||||
#[cfg(test)]
|
||||
behavior_anchor_plan_experiment::scene_extent(&mut scene);
|
||||
if scenario {
|
||||
scene.lifecycle = scenario_lifecycle::render::Rendering::new(
|
||||
p,
|
||||
@@ -1441,6 +1447,8 @@ impl Scene {
|
||||
}
|
||||
#[cfg(test)]
|
||||
behavior_layout_scene_experiment::resolve_row_anchor(*id, y);
|
||||
#[cfg(test)]
|
||||
behavior_anchor_plan_experiment::row_anchor(*id, y);
|
||||
if ordered {
|
||||
let slot = scenario::Slot {
|
||||
parent: owner,
|
||||
@@ -1465,6 +1473,8 @@ impl Scene {
|
||||
(*y - top).max(95.),
|
||||
),
|
||||
);
|
||||
#[cfg(test)]
|
||||
let rect = behavior_anchor_plan_experiment::frame_bounds(*id, rect);
|
||||
self.boxes.insert(
|
||||
0,
|
||||
BoxItem {
|
||||
@@ -1649,6 +1659,8 @@ impl Scene {
|
||||
}
|
||||
if ordered {
|
||||
self.sequence_bounds.insert(owner, (sequence_top, *y - 42.));
|
||||
#[cfg(test)]
|
||||
behavior_anchor_plan_experiment::scope_end(owner, y, &mut self.sequence_bounds);
|
||||
let slot = scenario::Slot {
|
||||
parent: owner,
|
||||
before: None,
|
||||
|
||||
Reference in New Issue
Block a user