- /
-
UI Animation - Hamburger Menu Icon <-> Close Icon
on 7 Nov 2023
- 5
- 23
- 0
- 0
- 514
drawframe(24);
Write your drawframe function below
function drawframe(f)
figure;
if mod(f, 48) < 24
i = mod(f, 24);
l1 = line([0 1], [0 0+i/24], "LineWidth", 10, "Color", "#0076a8");
l2 = line([0 1], [(0.5-i/48) (0.5+i/48)], "LineWidth", 10,"Color", "#0076a8");
l3 = line([0 1], [1 (1-i/24)], "LineWidth", 10,"Color", "#0076a8");
else
i = mod(f, 24);
l1 = line([0 1], [0 1-(i/24)], "LineWidth", 10, "Color", "#0076a8");
l2 = line([0 1], [(0+i/48) (1-i/48)], "LineWidth", 10, "Color", "#0076a8");
l3 = line([0 1], [1 (0+i/24)], "LineWidth", 10, "Color", "#0076a8");
end
axis off;
xlim([-1 2]);
ylim([-1 2]);
drawnow;
end