code for the lenticular animation