如何防止 Flash 使用“z”属性缩放后图像变得模糊?
我目前正在测试各种缩放图像的方法(或者更确切地说,整个 DisplayList 层次结构)。使用 scaleX
和 scaleY
效果很好,但是当我使用 z
属性缩放图像(通过将其放置得更远)时,图像变得返回到 z=0
时变得模糊。
图像被放入 Sprite
(“groundLayer”)中,而 Sprite
本身被放入另一个 Sprite
(“zoomLayer”)中。每当我缩放时,我仅操作“zoomLayer”的属性。
此图像是在将 scaleX
和 scaleY
返回到 1.0
后立即拍摄的:
此图像是在将 z
返回到 0.0
:
我尝试搜索有关此现象的信息,但找不到任何有用的信息。谁能解释那里发生了什么?为什么 Flash 在操作 z
属性后会使图像变得模糊?有没有办法防止这种情况(嗯,除了明显地保留 z
之外)?
I'm currently testing various ways to zoom images (or rather, whole DisplayList hierarchies). Using scaleX
and scaleY
works quite well, but when I use the z
property to zoom the image (by placing it further away) the image gets blurred when returning to z=0
.
The image is put in a Sprite
("groundLayer") and that Sprite
itself is put in another Sprite
("zoomLayer"). Whenever I'm zooming I'm manipulating properties of the "zoomLayer" only.
This image was taken right after returning scaleX
and scaleY
back to 1.0
:
This image was taken right after returning z
back to 0.0
:
I've tried searching for information about this phenomena but couldn't really find anything useful. Can anyone explain what's happening there? Why is Flash blurring the image after manipulating the z
property? Is there a way to prevent that (well, other than obviously leaving z
alone)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
每当您引入在不同渲染引擎下运行的 3D 时,它都会使事情变得非常模糊,如果可能的话确实应该避免。要解决返回到原始大小时的问题,您需要设置 mc.transform.matrix3D = null; ,然后它将返回到 2D 空间并再次正常渲染。
如果您想在不同的时间点执行此操作,请查看 这里的示例尝试挑选出对您更有用的东西:
在这个示例中我看不出您为什么更愿意使用 3d发动机而不是比二维尺度。
whenever you introduce the 3D you are operating under a different rendering engine, it makes things blurry as hell and really should be avoided if possible. To counteract the problem when returning to its original size you need to set
mc.transform.matrix3D = null;
then it will return to 2D space and be rendered normally again.if you are wanting to do it while at a different point then have a look through exampes hereto try and pick out something more useful to you:
I see no reason in this example why you would prefer to be using the 3d engine rather than the 2d scale.