implement time based stroke animation