如何使用 Actionscript 3 (Flash 10) 创建 3D 圆柱体、球体和圆锥体?

发布于 2024-10-06 08:35:56 字数 146 浏览 3 评论 0原文

我想使用 Flash Player 10 的 Actionscript 创建 3D 圆柱体、球体、圆锥体。有可用的类吗? 我还想知道如何绘制渐变、围绕它们包裹文本和纹理。如果这些类有这些功能就好了。我无法在此项目中使用非 DisplayObject,因此 PV3D 不是一个选项

I want to create a 3D cylinder, sphere, cone using Actionscript for Flash Player 10. Is there any available class?
I also want to know how to paint gradient, wrap text and texture around them. It would be nice if these class have these functions. I can't use non DisplayObject in this project so PV3D is not an option

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

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

发布评论

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

评论(2

森末i 2024-10-13 08:35:56

正如 Cameron 所说,您可能应该使用 PV3D 或 Away3D 等框架。也就是说,所有这些框架都是用 AS 编写的,因此您可以推出自己的框架。

以下是我仅使用 fp10 3d 引擎创建的一些示例:

http://actionsnippet.com/?p=1726

http://actionsnippet.com/?p=2092

http://actionsnippet.com/?p=2097

http://actionsnippet.com/?p=2158

您可以使用参数方程创建基本形状:

球体:

x = r sin(u) cos(v)
y = r cos(u) cos(v)
z = r sin(v)

对于圆柱体,您可以仅使用圆的方程并将其挤出:

x = r cos(t)
y = r sin(t)
z = increase at some interval to the height of the cylinder

如果您有兴趣,我可以发布一些有关此主题的其他信息。

As Cameron says, you should probably use a framework like PV3D or Away3D. That said, all those frameworks are written in AS so you could roll your own.

Here are a few examples I created using only the fp10 3d engine:

http://actionsnippet.com/?p=1726

http://actionsnippet.com/?p=2092

http://actionsnippet.com/?p=2097

http://actionsnippet.com/?p=2158

You can create primative shapes using parametric equations:

sphere :

x = r sin(u) cos(v)
y = r cos(u) cos(v)
z = r sin(v)

For a cylinder you can just use the equation for a circle and extrude it:

x = r cos(t)
y = r sin(t)
z = increase at some interval to the height of the cylinder

I can post some additional information about this topic if your interested.

流年已逝 2024-10-13 08:35:56

Flash 10 有 3D 绘图函数,但我认为它们不支持换行3D 对象周围的文本。听起来你需要一个 3D 框架。一些流行的(有很多):

请注意,Adobe 已宣布将很快发布新版本的 Flash 具有内置硬件加速 3D 渲染 API(代号为“molehill ”)。

There are 3D drawing functions for Flash 10, but I don't think they support wrapping text around a 3D object. It sounds like you need a 3D framework. Some popular ones (there's lots):

Keep mind that Adobe has announced that it will soon be releasing a new version of Flash with built-in hardware-accelerated 3D rendering APIs (codenamed "molehill").

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