鱼眼效果与核心动画? [英] Fish Eye Effect With Core Animation?

查看:95
本文介绍了鱼眼效果与核心动画?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在努力实现类似于ABC新闻iPad应用程序的全球效果。 ( Google图片示例

I am trying to achieve an effect similar to the globe of the ABC News iPad app. (Google Images Examples)

是否可以通过转换CALayers来获得此效果?或者这是使用OpenGL和片段/顶点着色器?

Is it possible to get this effect by transforming CALayers? Or is this using OpenGL and fragment/vertex shaders?

CALayer提供对变换矩阵的访问,是否有一些数学可以应用于此而不是转换OGL模型查看矩阵?像OGL这样的感觉是更复杂的方式,应该有一个更简单的解决方案。

CALayer provides access to the transformation matrix, is there some math that can be applied to this rather than transforming the OGL model view matrix? Feels like OGL is the more complicated way to do this and that there should be an easier solution.

如果有人有一些想法,我们非常感激。谢谢!

If anyone has some ideas it is much appreciated. Thanks!

推荐答案

无论你对转换矩阵做什么, CALayer 将始终保持平坦的表面。这就是为什么Apple喜欢将Core Animation称为2.5D(3D空间中的2D对象)。您可能可以排列多个图层,使它们形成一个球体,但是您不能同时在所有图层上映射纹理。

No matter what you do to the transformation matrix, a CALayer will always remain a flat surface. That's why Apple likes to call Core Animation "2.5D" (2D objects in 3D space). You might be able to arrange multiple layers so that they form a sphere but then you cannot map a texture across all layers at once.

这篇关于鱼眼效果与核心动画?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆