parsimonhi / animCJK

Draw animated Japanese characters (Kanji and Kana), Korean characters (Hanja) and Chinese characters (Hanzi) in correct stroke order using svg, free open-source code.
284 stars 72 forks source link

How to automatically restart animation after it finished #24

Closed UEPSs closed 1 year ago

UEPSs commented 1 year ago

I find stroke order animations stop after finishing playing. How to make them to auto restart? In other words, how to make animations auto repeat?

parsimonhi commented 1 year ago

It depends of the context.

How are you using animCJK?

UEPSs commented 1 year ago

It depends of the context.

How are you using animCJK?

I use it in android WebView.

parsimonhi commented 1 year ago

I meant, do you just display the svg files where the characters are stored in your android WebView? Or do you insert these svg files inside a html page and display this html page in your android WebView? And how do you select a character ? Or do you visit a website where animCJK is in use and this is the pages of this website that you display in your android WebView?

Making an auto-repeat needs modifying the css of each svg files one by one, or alternately can be done with some javascript codes that can be inserted in the svg files or in a web page that displays the svg files.

A sample of the later case can be seen at http://gooo.free.fr/animCJK/official/samples/ (select the "infinite" radio button, then click on "display"). But it needs some adaptation (depend what you are doing exactly).