Coding an animation with no libraries in Vanilla Javascript

Publicado em: 20 Agosto 2022
no canal de: Angel
86
1

#javascriptdesingpattern #asmrcoding #oop

I have coded using the Vim editor the Strategy desing pattern in Javascript. The video is self-explanatory, but if you don't understand some part, let me know your doubts in the comments below.

I wanted to show a picture depending on the selected strategy and applying an animation to discover the picture in a cooler form. The program is coded in Vanilla Javascript and no libraries are required.

The video is an step by step from the scratch. In the begining I stared with a very basic functionalities, then refactoring the code for decoupling. Using decoupling can make your code more readable, this is the reason that I think the video is self-explanatory.

In this video I have used some features as:

console.log, to set some traces to check if the program is working well.
create a class in Javascript and some OOP features, like constructor, methods and attributes.
const and let variables.
create and delete DOM elements, assing properties and css classes
Math library to generate random numbers.
addEventListener, used to wait until the web content is loaded.
Create buttons dinamically and assing a click operation.
setInterval function to call a custom function each X miliseconds and clearInterval to stop the function call.
try, catch and thrown for error management.
spread operator to copy an array.
array find function
recursive functionality
CSS animation

The video has some mistakes that I have make and I haven't deleted these parts

The video is speed two times up, so, you can watch it slower using the YouTube controls.

--
Keyboard sound effects: https://github.com/zevv/bucklespring


Nesta página do site você pode assistir ao vídeo on-line Coding an animation with no libraries in Vanilla Javascript duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário Angel 20 Agosto 2022, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 86 vezes e gostou 1 espectadores. Boa visualização!