如何在全屏和标准屏幕模式之间切换 Stage3D?

发布于 2024-12-22 05:51:52 字数 578 浏览 2 评论 0原文

我正在使用 ND2D 库(由 NullDesign 制作,引擎的源代码位于 github)。

我遇到的是,如果我将 Flash 应用程序切换到全屏模式,World2D (或 Stage3D / Context3D 埋在其中)不会自动拉伸以最大化到整个屏幕分辨率。

我需要将设置重新初始化为新的全屏尺寸吗?如果 stage.scaleMode 设置为 "NO_SCALE" 会怎样?这是否会影响尺寸,因为舞台虽然看起来更大,但仍会保留相同的坐标系和尺寸?

如果有人知道如何在 Stage3D 中正确切换全屏模式,请透露一些信息!

如果您有 ND2D 解决方案就更好了:)

谢谢!

I'm testing a few things with the ND2D library (made by NullDesign, engine's source available at github).

What I've encountered, is that if I toggle my Flash application to Fullscreen mode, the World2D (or Stage3D / Context3D buried inside it) doesn't auto-stretch to maximize it to the entire screen resolution.

Do I need to reinitialize my setup to the new Fullscreen dimensions? What if the stage.scaleMode is set to "NO_SCALE"? Will that affect the dimensions since the stage, although appearing larger, will still retain the same coordinate system and dimensions?

If anyone has ever figured out how to correctly toggle Fullscreen mode in Stage3D, please shed some light!

Even better if you have a solution in ND2D :)

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烟─花易冷 2024-12-29 05:51:52

感谢@annonymously,我能够想出自己的答案。
我在我的博客上写了一篇关于如何使用 ND2D 在 Stage3D 中实现全屏的文章。

有关详细信息,请参阅此帖子:http://pierrechamberlain.ca /blog/2011/12/as3-level-3-toggle-stage3d-fullscreen

首先,我浏览了 ND2D 论坛主题提到的匿名 http://nulldesign.de/nd2d/forum/topic.php?id= 10 以及最近的回复链接到 World2D 的 ND2D 类扩展,由 Rolpege 制作(不知道他是谁,但谢谢!)。

我对其进行了一些修改,因此它只执行我需要的操作(它最初执行了一些其他任务,我认为这些任务是预设的/根据开发人员的需求定制的)

尽管帖子中的示例包含相当多的黑盒内容 代码(来自我自己的个人库的类),我希望它对其他 Flash 开发人员来说会有用。

Thanks to @annonymously, I was able to come up with my own answer.
I've written up a post on my blog on how I achieved Fullscreen in Stage3D with ND2D.

See this post for details: http://pierrechamberlain.ca/blog/2011/12/as3-level-3-toggle-stage3d-fullscreen

First, I've looked through the ND2D forum thread mentioned by annonymously http://nulldesign.de/nd2d/forum/topic.php?id=10 and the most recent reply linked to an ND2D class extension for World2D, made by Rolpege (no idea who he is, but gracias!).

I modified it a bit so it does only what I need (it originally performed a few other tasks that I assume was presets / tailored to the developers' needs)

Although the example in the post contains quite a bit of black-boxed code (classes from my own personal library), I hope it will be useful for other Flash Developers to go over.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文