3 ms·
"SVG is inherently animated" is new to me, and now I'm going to spend my time on the bus thinking what might be done with that. Does it support infinite loop?
by pjc50 1y ago
"SVG is inherently animated" is new to me, and now I'm going to spend my time on the bus thinking what might be done with that. Does it support infinite loop?
- Jtsummers 1y ago> Does it support infinite loop? Yes it does. https://www.w3schools.com/graphics/svg_animation.asp https://www.w3schools.com/graphics/svg_animation.asp - Has some examples, you may need to refresh to see some of them (ones that don't repeat) in action as you scroll down the page.
- abirch 1y agoYes https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/Element/animate https://developer.mozilla.org/en-US/docs/Web/SVG/Reference/E... <svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <rect width="10" height="10"> <animate attributeName="rx" values="0;5;0" dur="10s" repeatCount="indefinite" /> </rect> </svg>
- snackbroken 1y ago> Does it support infinite loop? Yes, by setting the repeatCount or repeatDur attribute of the <animate> tag to "indefinite". Notably, since <animation> tags effect individual attributes and not the image as a whole, different parts of the image can be on different animation cycles and don't have to add up to some small common multiple.
- ngruhn 1y agoThat smells like Turing complete
- fouronnes3 1y agoTomorrow on HN: GPT-2 in pure SVG
- jerf 1y agoSVG embeds Ecmascript (or Javascript as the rest of the world knows it): https://www.w3.org/TR/SVG11/script.html https://www.w3.org/TR/SVG11/script.html So not only do you get all the animation support from the attributes, you can fill in anything you need from scripting.