Buffer auto-key performance takes in memory

This commit is contained in:
Your Name 2026-10-01 12:36:03 -04:00
parent abefa1c452
commit 0a53157b7e
3 changed files with 47 additions and 25 deletions

View file

@ -51,6 +51,19 @@
(drawn moved [u v :shape]))
(str "moving " path " by (7, -4) on the stage moves the shape by (7, -4)")))))
(deftest a-buffered-performance-take-becomes-one-set-of-authored-keys
(let [c (paint/new-shape (clip/blank) :main :shape 0 [0 0 10 0 5 10] :brow)
out (gesture/apply-take
c {[:main :shape]
{3 {[:xform :pos] [10 20] [:xform :rot] 0.25}
4 {[:xform :pos] [12 22] [:xform :rot] 0.5}}})]
(is (= {3 [10 20], 4 [12 22]}
(get-in out [:symbols :main :nodes :shape :channels [:xform :pos] :keys])))
(is (= {3 0.25, 4 0.5}
(get-in out [:symbols :main :nodes :shape :channels [:xform :rot] :keys])))
(is (= :linear
(get-in out [:symbols :main :nodes :shape :channels [:xform :pos] :interp])))))
(deftest turning-keeps-the-pivot-where-it-is
(let [c (two-down)
path [u v :shape]