为什么这个 ActionScript Flip 会导致我的网站变得模糊?
我正在使用翻转机制来浏览我的网站(翻转文件 & < a href="http://www.zaviola.co.cc/mm3/website.html" rel="nofollow noreferrer">演示)。问题是,一旦翻转,内容就会像我想要的那样显示得很好,但是翻转的(右侧)部分与实心的左侧部分有一些偏移(仔细观察时可以看到)。另外,右侧部分现在有点模糊(这是我的问题中令人不安的部分)。这都是由翻转引起的(我认为旋转Y引起了问题)。
当我单击按钮时,我会执行以下操作:
flip=new Flip(currentPage,nextPage,richting);
content.addChild(flip);
currentPage=nextPage;
nextPage = new MovieClip();
I'm using a flip mechanism to navigate through my site (flip file & demo). The problem is, once it's flipped the content been displayed good just like I want it, but there's some offset from the flipped (right) parts en the solid left part (visible when you look closely). Also the right part is now a little blurred (which is the disturbing part of my issue). This all caused by the flip (I think the rotationY is causing the problem).
When I click a button I do the following:
flip=new Flip(currentPage,nextPage,richting);
content.addChild(flip);
currentPage=nextPage;
nextPage = new MovieClip();
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有一个修复程序,请考虑以下事项:
也许您可以使用其他 3d 库找到更好的结果。
编辑:抱歉,“盒子”对象,我正在闪存中进行测试,但盒子将是您要翻转的任何页面。只需应用相同的逻辑即可。
there is a fix for it, consider the following:
maybe you can find better results using other 3d library.
EDIT: sorry the "box" object, I was testing in flash, but box would be any of your pages to flip. Just apply the same logic.
Flash & 的 Matteo Math对此有一个很好的解决方案。他实际上发现,当您将一个对象带入原生 3D 空间时,对象的宽度和高度都会扩展一个像素。这可以通过缩小对象然后将其 z 设置为 0(这会将其缩小)来抵消。现在该对象已准备好可以使用而不会模糊。
http://www.flashandmath.com/flashcs4/blursol/index.html
添加:这解决了比例问题,但没有解决模糊问题。您仍然需要使用上面发布的矩阵转换修复。
Matteo at Flash & Math has an excellent solution for this. He actually found that when you bring an object into native 3D space it expands the object by one pixel in both the width and height. This can be counteracted by scaling your object back and then setting it's z to 0 which will scale it back up. Now the object is ready to play with without the blur.
http://www.flashandmath.com/flashcs4/blursol/index.html
adding: This fixes the scale issue, but not the blurriness. You will still need to use the matrix transformation fix posted above.