简体   繁体   English

最加速的javascript snow

[英]The most accelerated javascript snow

I have saw a lot of them, but all they look not accelerated and slow. 我看到了很多,但它们看上去并没有加速和减速。

For instance: 例如:

Is it possible at all to have a script that will be smooth enough on iPhone 4 / typical Android device (like Kindle Fire)? 是否有可能在iPhone 4 /典型的Android设备(如Kindle Fire)上具有足够流畅的脚本?

Regards, 问候,

UPDATE 更新

Thanks to Julian D.! 感谢朱利安·D! designshack.net/?p=27674 is awesome! designshack.net/?p=27674很棒! No scripts at all, pure CSS, several layers are moving in different directions. 完全没有脚本,纯CSS,几层朝着不同的方向发展。 Some tips: 一些技巧:

  • Layer's patterns should be small enough (<=300px), 图层的图案应足够小(<= 300px),
  • There should be NO color animation (remove it from -webkit 50% and 100% keyframes), 不应有彩色动画(将其从-webkit 50%和100%关键帧中删除),
  • Use 2 layers instead of 3, 使用2层而不是3层,
  • Add -webkit-transform: translateZ(0); 添加-webkit-transform:translateZ(0); for all keyframes, see HTML5 transition perfomance on iPhone 4 for details, thanks to mikeyUX. 对于所有关键帧,感谢mikeyUX,有关详细信息,请参阅iPhone 4上的HTML5过渡性能
  • 20s is too smoothly, use 10s. 20s太平滑,请使用10s。

With all these tips it's fast enough on iOS (iPod 4 Touch) to be used in a real project. 通过所有这些技巧,它在iOS(iPod 4 Touch)上的速度足够快,可以在实际项目中使用。

If you are talking about hardware accelerated animations you want to look at CSS Keyframe Animation-based solutions, eg 如果您谈论的是硬件加速动画,则需要查看基于CSS关键帧动画的解决方案,例如

Here is a tutorial how to do - http://girliemac.com/blog/2009/02/18/using-keyframes-webkit-css-animation-examples/ 这是一个教学方法-http://girliemac.com/blog/2009/02/18/using-keyframes-webkit-css-animation-examples/

Still, your mileage may vary. 不过,您的里程可能会有所不同。 Some Android devices/version don't support hardwarde acceleration at all, you are out of luck here. 某些Android设备/版本完全不支持硬汉加速,您在这里很不走运。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM