svg-animate

Animate SVG with animateTransform

谁说胖子不能爱 提交于 2021-02-11 14:48:39
问题 Trying to animate an SVG element with the skewX . It works, however, not exactly the way I want it to. Now: the bottom part moves to the left Goal: the upper part should move to the right instead (and bottom stays in place) I tried with transform-origin but it didn't work. Any ideas how to solve this mystery? <svg xmlns="http://www.w3.org/2000/svg" width="102" height="102" viewBox="-50 -50 102 102"> <g> <rect width="10%" height="50%" style="fill:none; stroke:red; stroke-with:3;">

Use SVG animateTransform to rotate a path within a translated SVG within a SVG

夙愿已清 提交于 2021-01-24 14:45:47
问题 This is a follow-on to a previous question I asked, Make HTML Canvas generate PDF-ready Line art?. At @Peter O.'s suggestion, I reworked my software to use SVG instead of HTML Canvas. I am now abler to create a high-quality image: There is an outer <svg> for the entire object. There is a translated <svg> for each view. Instead that the arrow is drawn as a path. Here is the relevant code that produces the arrows: transformForPiece(p) { return 'translate(' + this.radius + ',' + this.radius + ')

Use SVG animateTransform to rotate a path within a translated SVG within a SVG

 ̄綄美尐妖づ 提交于 2021-01-24 14:45:15
问题 This is a follow-on to a previous question I asked, Make HTML Canvas generate PDF-ready Line art?. At @Peter O.'s suggestion, I reworked my software to use SVG instead of HTML Canvas. I am now abler to create a high-quality image: There is an outer <svg> for the entire object. There is a translated <svg> for each view. Instead that the arrow is drawn as a path. Here is the relevant code that produces the arrows: transformForPiece(p) { return 'translate(' + this.radius + ',' + this.radius + ')

Can svg animations be suspended without loosing accumulative information?

自古美人都是妖i 提交于 2020-12-29 04:54:09
问题 You can stop and repeat animations without limitations, but if you restart an indefinite animation it will loose its accumulative value and start from the initial value. Maybe I should clarify with an example; Take this animation: <animate id="main" attributeName="transform" attributeType="XML" begin="startbox.click" dur="1s" end="endbox.click" from="rotate(0)" to="rotate(360)" additive="sum" accumulate="sum" fill="freeze" repeatCount="indefinite" /> If I stop this animation, and start a

Animated semicircles in logo with SVG

删除回忆录丶 提交于 2020-07-23 06:36:21
问题 I would like to make this graphic in SVG. I can use <animate> tags and I can manipulate the SVG document with javascript. I would prefer to do it all in SVG if possible. 回答1: Here's a simpler example: <svg height="200" width="200" viewBox="0 0 144 144"> <circle cx="72" cy="72" r="49" stroke-width="6" stroke="#F68524" fill="none"/> <circle cx="72" cy="72" r="49" stroke-width="6" stroke="#838588" fill="none"> <animate attributeName="stroke-dasharray" values="154 0;0 154" dur="1s" repeatCount=

Animated semicircles in logo with SVG

☆樱花仙子☆ 提交于 2020-07-23 06:35:27
问题 I would like to make this graphic in SVG. I can use <animate> tags and I can manipulate the SVG document with javascript. I would prefer to do it all in SVG if possible. 回答1: Here's a simpler example: <svg height="200" width="200" viewBox="0 0 144 144"> <circle cx="72" cy="72" r="49" stroke-width="6" stroke="#F68524" fill="none"/> <circle cx="72" cy="72" r="49" stroke-width="6" stroke="#838588" fill="none"> <animate attributeName="stroke-dasharray" values="154 0;0 154" dur="1s" repeatCount=