SVG Animations using SMIL (1)
SVG Animations using SMIL (1)
SVG Animations using SMIL (1)
So, why are we talking about SVG?
Well, are we not all front-end devs?
Well, are we not all front-end devs?
I bet you are.
If so, we certainly have chances that our clients ask us to animate stuff.
If so, we certainly have chances that our clients ask us to animate stuff.
When that happens, they may ask you for a clickable icon which morphs into another shape like this:
Visit the original CodePen "SVG Toggle Animation" by Mike Harris (@mikemjharris). Or, he has a blog post.
See the Pen
SVG Toggle Animation - Final result by Mike Harris (@mikemjharris)
on CodePen.
Or, it could be a company logo which keeps changing shapes in the background like this:
Visit the original CodePen "Pulsing sphere endless animation with SVG" by CeramicSoda (@ceramicSoda).
See the Pen
Pulsing sphere endless animation with SVG by CeramicSoda (@ceramicSoda)
on CodePen.
When making modern websites, you may not avoid talking about micro-animations.
They are not just something which make your website look fancy, but play essential roles in UI/UX today.
Do you agree on this so far?
SVGs are DOM elements
Let me tell you a story.
I was once very much into FX trading, and watched FX charts almost everyday.
Although I don't remember which website it was, one of the FX websites had a very good FX chart there.
So, one day, I looked into their source codes as I was curious as to how they implemented the chart.
After a bit of investigation, I found out that the developers were using 2 different technologies.
For LINE CHARTS, they were using Canvas API.
for CANDLES, they were using SVGs.
for CANDLES, they were using SVGs.
It totally makes sense to me.
For Line Charts,
you don't want to refresh the graph too often (only once a while to retrieve the latest FX information).
Once charts were rendered using Canvas API, you want the lines unchanged.
On the other hand, Candles were one of the information layers.
Users were able to apply the layers on top of the line chart, and perform various operations on them.
For these, you want them to change only when user requested to do so.
So, having SVG for these layers was an adequate solution for candles.
NEXT
Your privacy
By clicking "OK" you agree Astralscience can store cookies on your device and disclose information in accordance with our Cookie Policy.
個人情報の保護について
以下 OK をクリックすることにより、Astralscience があなたの端末にクッキーを保存し、クッキー・ポリシー に従って情報を開示することに同意します。
Quyền riêng tư của bạn
Bằng cách nhấn "OK", bạn đồng ý rằng Astralscience có thể lưu cookie trên thiết bị của bạn và xử lý thông tin theo Chính sách Cookie của chúng tôi.
