如何在 OSX 桌面上创建动画波纹效果
我正在尝试在 OSX 桌面上创建动画波纹效果。实际上,不仅仅是桌面,还有桌面及其上的任何窗口的图像。
就好像屏幕是一个池塘,一块石头落在它的某个特定点上。
谁能给我一些关于如何实现这一目标的指示?任何示例源代码都将受到赞赏。
I'm trying to create an animated ripple effect on the desktop of OSX. Not just the desktop, actually, but image of the desktop plus any windows on it.
As if the screen was a pond and a stone fell on a given point of it.
Can anyone give me some pointers on how to achieve this? Any sample source code woud be gratlt appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
此页面上有一个小代码片段,描述了作者如何在 iOS 上实现水波纹效果。包含一些开发信息和视频:
http://fabiensanglad.net/fluide/
更新:
Core Image提供了一个CIRippleTransition(http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CoreImageFilterReference/Reference/reference.html#//apple_ref/doc/filter/ci/CIRippleTransition - AFAIK这被使用by Dashboard < 10.7)
此示例将 CI Transition 与 Core Animation 结合使用:
http://theocacao.com/document.page/528
如果将其与简单的 < a href="http://developer.apple.com/library/mac/#qa/qa1741/_index.html#//apple_ref/doc/uid/DTS40011008" rel="nofollow">屏幕截图 您将获得桌面的图像所需的连锁反应。
There is a small code fragment on this page, that describes how the author implemented a water ripple effect on iOS. Contains some development information and a video:
http://fabiensanglard.net/fluide/
Update:
Core Image provides a CIRippleTransition (http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CoreImageFilterReference/Reference/reference.html#//apple_ref/doc/filter/ci/CIRippleTransition - AFAIK this was used by Dashboard < 10.7)
This example uses the CI Transition in combination with Core Animation:
http://theocacao.com/document.page/528
If you combine that with a simple screenshot you get an image of your desktop & the desired ripple effect.