progress of typing is animated in canvas