Added animation constructor.