How to create the code of the following video effect?

Continued here: How to create the code of the following video effect?