Вот трюк / хак с использованием CSS.Идея состоит в том, чтобы полагаться на переход, чтобы иметь вращение, а затем играть с длительностью, чтобы создать иллюзию заморозка .Устанавливая большое значение, вы делаете переход очень очень медленным, поэтому он будет остановлен для нас.
Вы должны отрегулировать значение скорости вращения / вращения для каждого колеса, чтобы получить желаемую скорость.Вам также нужно сделать значения достаточно большими, чтобы пользователь никогда не достигал конца перехода.
$('#gO1').click(function() {
$('#wheel,#col-small,#planetar').addClass('rotate').removeClass('rotate-1');
})
$('#stop1').click(function() {
$('#wheel,#col-small,#planetar').addClass('rotate-1').removeClass('rotate');
})
#wheel,
#col-small,
#planetar{
transform-box:fill-box;
transform-origin:center;
}
#wheel.rotate{
transform:rotate(36000deg);
transition:1400s linear;
}
#planetar.rotate {
transform:rotate(-36000deg);
transition:2800s linear;
}
#col-small.rotate {
transform:rotate(-36000deg);
transition:350s linear;
}
#wheel.rotate-1{
transform:rotate(36001deg); /*we need a slight change to re-trigger the transition*/
transition:140000s linear;
}
#planetar.rotate-1 {
transform:rotate(-36001deg);
transition:280000s linear;
}
#col-small.rotate-1 {
transform:rotate(-36001deg);
transition:35000s linear;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink='http://www.w3.org/1999/xlink' width="400" height="400" viewBox="0 0 400 400" >
<title>animation planetary mechanism</title>
<defs>
<marker id="MarkerArrow" viewBox="0 0 20 20" refX="2" refY="5" markerUnits="userSpaceOnUse" orient="auto" markerWidth="20" markerHeight="20">
<rect width="14" height="10" rx="2" fill="#22211D" />
</marker>
<line id="line1" x1="150" y1="100" x2="60" y2="100" style=" fill:none;
marker-end: url(#MarkerArrow);
marker-start: url(#MarkerArrow);
stroke:#22211D; stroke-width:6; ">
</line>
<marker id="MarkerArrow-s" viewBox="0 0 20 20" refX="3" refY="1.7" markerUnits="userSpaceOnUse" orient="auto" markerWidth="20" markerHeight="20">
<rect width="7" height="3.5" rx="2" fill="#22211D" />
</marker>
<line id="line-s" x1="175" y1="100" x2="202" y2="100" style=" fill:none;
marker-end: url(#MarkerArrow-s1);
marker-start: url(#MarkerArrow-s);
stroke:#22211D; stroke-width:2; ">
</line>
<linearGradient id="vertical" x2="0%" y2="100%" spreadMethod="pad">
<stop offset="0%" stop-color="powderblue" />
<stop offset="100%" stop-color="lightgreen" />
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url(#vertical)" />
<g transform="translate(90,50)">
<g id="wheel">
<g>
<use xlink:href="#line1" transform="rotate(0 100 100)" />
<use xlink:href="#line1" transform="rotate(120 100 100)" />
<use xlink:href="#line1" transform="rotate(240 100 100)" />
<circle cx="100" cy="100" r="15" style="stroke: #22211D; fill:none; stroke-width: 4px;" />
<circle cx="100" cy="100" r="50" style="stroke: #22211D; fill:none; stroke-width: 15px;" />
<circle cx="100" cy="100" r="60" style="stroke: #22211D; fill:none; stroke-dasharray: 5 6; stroke-width: 10px;" />
<circle cx="150" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g id="col-small">
<g>
<use xlink:href="#line-s" transform="rotate(0 188 100)" />
<use xlink:href="#line-s" transform="rotate(120 188 100)" />
<use xlink:href="#line-s" transform="rotate(240 188 100)" />
<circle cx="188" cy="100" r="8" style="stroke: #22211D; fill:none; stroke-width: 4px;" />
<circle cx="188" cy="100" r="18" style="stroke: #22211D; fill:none; stroke-width: 7px;" />
<circle cx="188" cy="100" r="24" style="stroke: #22211D; fill:none; stroke-dasharray: 5 5; stroke-width: 10px;" />
<circle cx="206" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g id="planetar">
<g>
<circle cx="100" cy="100" r="116" style="stroke: #22211D; fill:none; stroke-dasharray: 5 5; stroke-width: 10px;" />
<circle cx="100" cy="100" r="124" style="stroke: #22211D; fill:none; stroke-width: 12px;" />
<circle cx="224" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g>
<use xlink:href="#col-small" transform="rotate(240 100 100)" />
<use xlink:href="#col-small" transform="rotate(120 100 100)" />
</g>
<g transform="translate(-10,160)">
<g id="gO1">
<rect x="45" y="85" height="22" width="60" rx="5" fill="#0080B8" stroke="dodgerblue" />
<text x="62" y="102" font-size="16" fill="yellow">GO</text>
</g>
<g id="stop1">
<rect x="110" y="85" height="22" width="60" rx="5" fill="crimson" stroke="red" />
<text x="120" y="102" font-size="16" fill="yellow">STOP</text>
</g>
</g>
</g>
</svg>
ОБНОВЛЕНИЕ
Кажется, что выше работает нормально только на Chrome, так что вот еще один, где япришлось продублировать код маленького колеса, чтобы он хорошо работал и в Firefox:
$('#gO1').click(function() {
$('#wheel,.col-small g,#planetar').addClass('rotate').removeClass('rotate-1');
})
$('#stop1').click(function() {
$('#wheel,.col-small g,#planetar').addClass('rotate-1').removeClass('rotate');
})
#wheel,
.col-small g,
#planetar{
transform-box:fill-box;
transform-origin:center;
}
#wheel.rotate{
transform:rotate(36000deg); /*360 x 100*/
transition:1400s linear; /*14s x 100*/
}
#planetar.rotate {
transform:rotate(-36000deg);
transition:2800s linear;
}
.col-small g.rotate {
transform:rotate(-36000deg);
transition:350s linear;
}
#wheel.rotate-1{
transform:rotate(36001deg); /*we need a slight change to re-trigger the transition*/
transition:140000s linear; /*14s x 100 x 100*/
}
#planetar.rotate-1 {
transform:rotate(-36001deg);
transition:280000s linear;
}
.col-small g.rotate-1 {
transform:rotate(-36001deg);
transition:35000s linear;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink='http://www.w3.org/1999/xlink' width="400" height="400" viewBox="0 0 400 400" >
<title>animation planetary mechanism</title>
<defs>
<marker id="MarkerArrow" viewBox="0 0 20 20" refX="2" refY="5" markerUnits="userSpaceOnUse" orient="auto" markerWidth="20" markerHeight="20">
<rect width="14" height="10" rx="2" fill="#22211D" />
</marker>
<line id="line1" x1="150" y1="100" x2="60" y2="100" style=" fill:none;
marker-end: url(#MarkerArrow);
marker-start: url(#MarkerArrow);
stroke:#22211D; stroke-width:6; ">
</line>
<marker id="MarkerArrow-s" viewBox="0 0 20 20" refX="3" refY="1.7" markerUnits="userSpaceOnUse" orient="auto" markerWidth="20" markerHeight="20">
<rect width="7" height="3.5" rx="2" fill="#22211D" />
</marker>
<line id="line-s" x1="175" y1="100" x2="202" y2="100" style=" fill:none;
marker-end: url(#MarkerArrow-s1);
marker-start: url(#MarkerArrow-s);
stroke:#22211D; stroke-width:2; ">
</line>
<linearGradient id="vertical" x2="0%" y2="100%" spreadMethod="pad">
<stop offset="0%" stop-color="powderblue" />
<stop offset="100%" stop-color="lightgreen" />
</linearGradient>
</defs>
<rect width="100%" height="100%" fill="url(#vertical)" />
<g transform="translate(90,50)">
<g id="wheel">
<g>
<use xlink:href="#line1" transform="rotate(0 100 100)" />
<use xlink:href="#line1" transform="rotate(120 100 100)" />
<use xlink:href="#line1" transform="rotate(240 100 100)" />
<circle cx="100" cy="100" r="15" style="stroke: #22211D; fill:none; stroke-width: 4px;" />
<circle cx="100" cy="100" r="50" style="stroke: #22211D; fill:none; stroke-width: 15px;" />
<circle cx="100" cy="100" r="60" style="stroke: #22211D; fill:none; stroke-dasharray: 5 6; stroke-width: 10px;" />
<circle cx="150" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g class="col-small">
<g>
<use xlink:href="#line-s" transform="rotate(0 188 100)" />
<use xlink:href="#line-s" transform="rotate(120 188 100)" />
<use xlink:href="#line-s" transform="rotate(240 188 100)" />
<circle cx="188" cy="100" r="8" style="stroke: #22211D; fill:none; stroke-width: 4px;" />
<circle cx="188" cy="100" r="18" style="stroke: #22211D; fill:none; stroke-width: 7px;" />
<circle cx="188" cy="100" r="24" style="stroke: #22211D; fill:none; stroke-dasharray: 5 5; stroke-width: 10px;" />
<circle cx="206" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g id="planetar">
<g>
<circle cx="100" cy="100" r="116" style="stroke: #22211D; fill:none; stroke-dasharray: 5 5; stroke-width: 10px;" />
<circle cx="100" cy="100" r="124" style="stroke: #22211D; fill:none; stroke-width: 12px;" />
<circle cx="224" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g class="col-small" transform="rotate(240 100 100)">
<g>
<use xlink:href="#line-s" transform="rotate(0 188 100)" />
<use xlink:href="#line-s" transform="rotate(120 188 100)" />
<use xlink:href="#line-s" transform="rotate(240 188 100)" />
<circle cx="188" cy="100" r="8" style="stroke: #22211D; fill:none; stroke-width: 4px;" />
<circle cx="188" cy="100" r="18" style="stroke: #22211D; fill:none; stroke-width: 7px;" />
<circle cx="188" cy="100" r="24" style="stroke: #22211D; fill:none; stroke-dasharray: 5 5; stroke-width: 10px;" />
<circle cx="206" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g class="col-small" transform="rotate(120 100 100)">
<g>
<use xlink:href="#line-s" transform="rotate(0 188 100)" />
<use xlink:href="#line-s" transform="rotate(120 188 100)" />
<use xlink:href="#line-s" transform="rotate(240 188 100)" />
<circle cx="188" cy="100" r="8" style="stroke: #22211D; fill:none; stroke-width: 4px;" />
<circle cx="188" cy="100" r="18" style="stroke: #22211D; fill:none; stroke-width: 7px;" />
<circle cx="188" cy="100" r="24" style="stroke: #22211D; fill:none; stroke-dasharray: 5 5; stroke-width: 10px;" />
<circle cx="206" cy="100" r="3" style="stroke: #22211D; fill:yellow; " />
</g>
</g>
<g transform="translate(-10,160)">
<g id="gO1">
<rect x="45" y="85" height="22" width="60" rx="5" fill="#0080B8" stroke="dodgerblue" />
<text x="62" y="102" font-size="16" fill="yellow">GO</text>
</g>
<g id="stop1">
<rect x="110" y="85" height="22" width="60" rx="5" fill="crimson" stroke="red" />
<text x="120" y="102" font-size="16" fill="yellow">STOP</text>
</g>
</g>
</g>
</svg>