Telegram Group & Telegram Channel
Web Animations API

Shu paytgacha CSS animatsiyalarni JS orqali ham yozsa, boshqarsa bo'lishini bilmagan ekanman!
CSS dagi animatsiyalarni JS orqali boshqarish desa faqat ular bo'glangan klasslarni elementga biriktirish/o'chirishni tushunardim.

Masalan, g'oyib bo'lish animatsiyasini solishtirsak bo'ladi:

CSS

#element {
animation: fade 3s ease forwards;
}

@keyframes fade {
from { opacity: 1; }
to { opacity: 0; }
}


JS

const element = document.getElementById('element');

const keyframes = [
{ opacity: 0 },
{ opacity: 1 }
];

const options = {
duration: 3000,
easing: 'ease',
fill: 'forwards',
};

const animation = new Animation(new KeyframeEffect(element, keyframes, options));

animation.play()
animation.pause()
animation.finish()
animation.cancel()



Qachon qaysi birini ishlatamiz?

Animatsiyalar uchun requestAnimationFrame() dan foydalanish ham mumkin. Faqat u CPU dan foydalanadi. CSS animatsiylar esa GPU dan.

Web Animations API

1. bizga aynan CSS dagi animatsiyalarni boshqarish imkonini KENGAYTIRADI.

2. lekin baribir aslida siz CSS animatsiyalarni ishlatayotgan bo'lasiz.

3. piksellarning hisob kitobi "main thread"dan tashqarida bo'ladi.

4. UI komponentlar yaratish uchun juda mos.

5. Deklarativ


requestAnimationFrame()

1. animatsiyani kardma-kadr yartish imkonini beradi.

2. animatsiyani boshqarish to'laqonli JS kodga bog'liq boladi.

3. shu sabab, har bir kard uchun piksellarni hisoblash "main thread" da amalga oshadi.

4. O'yinlar va o'ta murakkab, sinxron harakat qiluvchi elementlardan iborat animatsiyalar uchun mos.

5. Imperativ



tg-me.com/brogrammist/184
Create:
Last Update:

Web Animations API

Shu paytgacha CSS animatsiyalarni JS orqali ham yozsa, boshqarsa bo'lishini bilmagan ekanman!
CSS dagi animatsiyalarni JS orqali boshqarish desa faqat ular bo'glangan klasslarni elementga biriktirish/o'chirishni tushunardim.

Masalan, g'oyib bo'lish animatsiyasini solishtirsak bo'ladi:

CSS


#element {
animation: fade 3s ease forwards;
}

@keyframes fade {
from { opacity: 1; }
to { opacity: 0; }
}


JS

const element = document.getElementById('element');

const keyframes = [
{ opacity: 0 },
{ opacity: 1 }
];

const options = {
duration: 3000,
easing: 'ease',
fill: 'forwards',
};

const animation = new Animation(new KeyframeEffect(element, keyframes, options));

animation.play()
animation.pause()
animation.finish()
animation.cancel()



Qachon qaysi birini ishlatamiz?

Animatsiyalar uchun requestAnimationFrame() dan foydalanish ham mumkin. Faqat u CPU dan foydalanadi. CSS animatsiylar esa GPU dan.

Web Animations API

1. bizga aynan CSS dagi animatsiyalarni boshqarish imkonini KENGAYTIRADI.

2. lekin baribir aslida siz CSS animatsiyalarni ishlatayotgan bo'lasiz.

3. piksellarning hisob kitobi "main thread"dan tashqarida bo'ladi.

4. UI komponentlar yaratish uchun juda mos.

5. Deklarativ


requestAnimationFrame()

1. animatsiyani kardma-kadr yartish imkonini beradi.

2. animatsiyani boshqarish to'laqonli JS kodga bog'liq boladi.

3. shu sabab, har bir kard uchun piksellarni hisoblash "main thread" da amalga oshadi.

4. O'yinlar va o'ta murakkab, sinxron harakat qiluvchi elementlardan iborat animatsiyalar uchun mos.

5. Imperativ

BY Brogrammist


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/brogrammist/184

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

What Is Bitcoin?

Bitcoin is a decentralized digital currency that you can buy, sell and exchange directly, without an intermediary like a bank. Bitcoin’s creator, Satoshi Nakamoto, originally described the need for “an electronic payment system based on cryptographic proof instead of trust.” Each and every Bitcoin transaction that’s ever been made exists on a public ledger accessible to everyone, making transactions hard to reverse and difficult to fake. That’s by design: Core to their decentralized nature, Bitcoins aren’t backed by the government or any issuing institution, and there’s nothing to guarantee their value besides the proof baked in the heart of the system. “The reason why it’s worth money is simply because we, as people, decided it has value—same as gold,” says Anton Mozgovoy, co-founder & CEO of digital financial service company Holyheld.

What is Telegram?

Telegram’s stand out feature is its encryption scheme that keeps messages and media secure in transit. The scheme is known as MTProto and is based on 256-bit AES encryption, RSA encryption, and Diffie-Hellman key exchange. The result of this complicated and technical-sounding jargon? A messaging service that claims to keep your data safe.Why do we say claims? When dealing with security, you always want to leave room for scrutiny, and a few cryptography experts have criticized the system. Overall, any level of encryption is better than none, but a level of discretion should always be observed with any online connected system, even Telegram.

telegram from us


Telegram Brogrammist
FROM USA