mirror of
https://github.com/penpot/penpot.git
synced 2026-11-21 01:22:01 +00:00
A mirror stores its turn either way, so two variants can hold a flipped child with one transform and the rotations 315 and 45. A switch compared the attributes one by one: it carried the copy's transform and corners, whose values both variants share, but not its rotation, leaving a shape whose rotation its transform does not hold. The turns of two mirrors now also agree where they point their axes alike, so the turn carries with the transform. Test (the variant gate program of round 12, seed 164135730): switching-a-copy-carries-the-turn-of-a-mirrored-child-with-its-transform Composable generated, swap group and variant tests: 533 tests, 0 failures. Benchmark (scripts/bench-components, ms, lower 2.5% quantile): | :world | :baseline | :now | :mean | :ratio | |------------------------------------+-----------+---------+---------+--------| | deepest-edit-through-three-levels | 35.215 | 21.684 | 22.254 | 0.62 | | edit-through-a-chain-of-dependents | 68.931 | 40.146 | 43.327 | 0.58 | | library-update-into-copies | 83.083 | 50.403 | 52.479 | 0.61 | | main-edit-among-many-shapes | 4.837 | 2.045 | 2.23 | 0.42 | | main-edit-into-10-copies | 1.79 | 1.098 | 1.131 | 0.61 | | main-edit-into-100-copies | 15.415 | 10.462 | 10.578 | 0.68 | | main-edit-into-1000-copies | 153.086 | 103.929 | 107.681 | 0.68 | | variant-switch-into-copies | 32.052 | 21.622 | 22.386 | 0.67 | AI-assisted-by: claude-opus-5-5