Qt6 QML Book/图形效果/小结

Summary

小结

When creating new user interfaces effects can make a difference between a dull interface and a sparkling interface. In this chapter we've looked at particle effects and shaders.

当创建新的用户界面时,效果可以在枯燥的界面和闪亮的界面之间产生区别。在本章中,我们介绍了粒子效果和着色器。

Particles provide a powerful and fun way to express graphical phenomena like smoke. firework, random visual elements. The particles look are playful and have a great potential when used wisely to create some eye catcher in any user interface. Using too many particle effects inside a user interface will definitely lead to the impression towards a game. Creating games is also the real strength of the particles.

粒子提供了一种强大而有趣的方式来表达烟雾等图形现象。烟花,随机的视觉元素。这些粒子看起来很好玩,如果能在任何用户界面上巧妙地使用,它们都有很大的潜力。在用户界面中使用过多的粒子效果肯定会给游戏留下印象。创造游戏也是粒子的真正优势。

Shaders can be used to take the QML scene to the next level. Using vertex shaders it is possible to change the shape of elements, while fragment shaders are used to alter the texture of an element, e.g. changing the colour, or transforming the surface to produce effects such as waves.

着色器可用于将QML场景提升到下一级别。使用顶点着色器可以更改元素的形状,而片段着色器用于更改元素的纹理,例如更改颜色或变换曲面以产生波浪等效果。

In this chapter we've scratched the surface of these two topics. For the interested reader, there are many more possibities to explore.

在本章中,我们已经触及了这两个主题的表面。对于感兴趣的读者来说,还有更多的可能性可以探索。

上一篇:antibiotic


下一篇:【跳马问题】“回溯法”——《算法设计与分析(第五版)》