feat: интеграция Lottie анимации AI robot в assist.html

- Заменена CSS сфера на dotlottie-player
- Анимация реагирует на состояния (idle/listening/speaking)
- Скорость анимации зависит от RMS уровня микрофона
- Добавлена обработка ошибок загрузки
- Сохранены все WebSocket команды и события
This commit is contained in:
2026-05-25 18:04:37 +03:00
parent a31fb3a112
commit 8a4686c800
+13 -1
View File
@@ -354,7 +354,8 @@
background="transparent" background="transparent"
speed="1" speed="1"
loop loop
autoplay> autoplay
intermission="0">
</dotlottie-player> </dotlottie-player>
</div> </div>
@@ -632,6 +633,17 @@
console.log('✅ Lottie animation loaded'); console.log('✅ Lottie animation loaded');
updateLottieSpeed(); updateLottieSpeed();
}); });
lottiePlayer.addEventListener('error', (e) => {
console.error('❌ Lottie animation error:', e);
console.log('Trying to load first animation...');
// Попробовать загрузить первую анимацию из файла
lottiePlayer.load('AI robot.lottie');
});
lottiePlayer.addEventListener('load', () => {
console.log('✅ Lottie file loaded successfully');
});
} }
}); });
</script> </script>