speed up animation

This commit is contained in:
Daylin Morgan 2024-02-19 16:12:27 -06:00 committed by Daylin Morgan
parent a6e1093c0e
commit c6d216fd30
Signed by: daylin
GPG key ID: 950D13E9719334AD
3 changed files with 5 additions and 5 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- © 2023 Daylin Morgan | rev. 590de5a -->
<!-- © 2024 Daylin Morgan | rev. a6e1093 -->
<svg height="800" width="800" xmlns="http://www.w3.org/2000/svg" version="1.1">
<defs>
<style type="text/css">
@ -31,7 +31,7 @@
.m {
stroke-dasharray: 2000;
stroke-dashoffset: 2000;
animation: draw 2.5s linear forwards;
animation: draw 1s linear forwards;
}
@keyframes draw {
@ -56,7 +56,7 @@
l -160.0, 0
"/>
<g class="d">
<animateTransform attributeName="transform" begin="0s" dur="2.25s" type="rotate" from="0 400.0 268.0" to="360 400.0 268.0"/>
<animateTransform attributeName="transform" begin="0s" dur="1s" type="rotate" from="0 400.0 268.0" to="360 400.0 268.0"/>
<circle cx="400.0" cy="268.0" r="136.0"/>
<path class="fg" d="M 264.0,268.0 a 1 1 0 0 0 272.0 0 z"/>
</g>

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -1,7 +1,7 @@
.m {
stroke-dasharray: 2000;
stroke-dashoffset: 2000;
animation: draw 2.5s linear forwards;
animation: draw 1s linear forwards;
}
@keyframes draw {

View file

@ -86,7 +86,7 @@ proc drawD(animate: bool): Nodes =
g(class = "d"):
if animate:
let coords = $coord.dc.x & " " & $coord.dc.y
animateTransform(attributeName="transform", begin="0s" ,dur="2.25s", type="rotate", `from`="0 " & coords, to="360 " & coords)
animateTransform(attributeName="transform", begin="0s" ,dur="1s", type="rotate", `from`="0 " & coords, to="360 " & coords)
circle(cx = coord.dc.x, cy = coord.dc.y, r = coord.dr)
path(class = "fg", d = &"M {start.x},{start.y} a 1 1 0 0 0 {coord.dr*2} 0 z")