Я работаю над веб-приложением activjs.У меня есть файл svg spinner, который уже включает анимацию.Мне интересно, есть ли способ, которым я могу сделать это (включая анимацию) на rectjs.Я уже рендеринг изображений SVG, но когда я использую то же самое предложение, которое у меня есть для этого ничего не отображается.Я предполагаю, что это потому, что анимация.
Есть способ " извлечь " анимацию из SVG и преобразовать ее в ключевые кадры ?
Это svg-файл:
<svg width='48px' height='48px' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" class="uil-default">
<rect x="0" y="0" width="100" height="100" fill="none" class="bk"></rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(0 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-1s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(25.714285714285715 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.9285714285714286s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(51.42857142857143 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.8571428571428571s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(77.14285714285714 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.7857142857142857s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(102.85714285714286 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.7142857142857143s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(128.57142857142858 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.6428571428571429s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(154.28571428571428 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.5714285714285714s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(180 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.5s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(205.71428571428572 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.42857142857142855s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(231.42857142857142 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.35714285714285715s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(257.14285714285717 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.2857142857142857s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(282.85714285714283 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.21428571428571427s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(308.57142857142856 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.14285714285714285s' repeatCount='indefinite'/>
</rect>
<rect x='47' y='40' width='6' height='20' rx='3' ry='3' fill='#000000' transform='rotate(334.2857142857143 50 50) translate(0 -30)'>
<animate attributeName='opacity' from='1' to='0' dur='1s' begin='-0.07142857142857142s' repeatCount='indefinite'/>
</rect>
</svg>
Большое спасибо!