Chessistics/tools/automation/test_trajectory.py
Samuel Bouchet 480c783bd6 Add bidirectional arrows and idle pulsation on piece trajectories
TrajectView now draws an arrow at each endpoint (since pieces oscillate
between start and end, both directions are relevant) and runs a looped
width/alpha tween that breathes between 0.3 and 0.75 over ~2.2s. The
pulse makes stationary relays visually distinct from static board art
without competing with active cargo/particle animations.
2026-04-17 22:31:56 +02:00

24 lines
680 B
Python

"""Visual smoke for trajectory arrows + pulsation."""
import sys, time
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
from tools.automation.harness import Harness
def main():
with Harness.launch(run_name="trajectory") as h:
h.load_mission("campaign_01", 0)
h.place("Pawn", (0, 1), (1, 1))
h.place("Pawn", (2, 1), (3, 1))
# Capture two frames at different phases of the pulse loop
h.screenshot("01_placed_a")
time.sleep(0.8)
h.screenshot("02_placed_b_pulse")
print("OK — trajectories rendered; see screens for arrows + pulse")
if __name__ == "__main__":
main()