Coding an animation with no libraries in Vanilla Javascript

Опубликовано: 20 Август 2022
на канале: 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


На этой странице сайта вы можете посмотреть видео онлайн Coding an animation with no libraries in Vanilla Javascript длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Angel 20 Август 2022, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 86 раз и оно понравилось 1 зрителям. Приятного просмотра!