在 ActionScript 3 中使用 Papervision 3D 返回 md2 的动画通道?
我目前正在研究 FlarToolkit / Papervision3D / Quake2 模型解析,我已成功加载、纹理化和动画化。 话虽这么说,动画调用只是我的猜测,到目前为止我所知道的是“跳跃”和“奔跑”可用。 当我使用 MD2 类的内置 getAnimationChannels() 时,它仅返回 MorphChannel3D 对象数组,如下所示。
//md2 是一个已经加载并等待利用给定事件的模型。
trace(_md2.getAnimationChannels()); //returns [object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D]
根据我在自己的搜索中看到的情况,这应该返回字符串形式的通道名称数组。 我尝试从 MorphChannel3D 对象中提取属性,但使用 foreach(var p:* in Object); 没有成功。
我哪里出错了,如何获取动画频道的名称以便我可以随意调用它们?
谢谢。
I am currently working on a FlarToolkit / Papervision3D / Quake2 model parsing, that I have successfully loaded, textured, and animated. That being said, the animation calls are merely a guess to me and so far all I know is that "jump" and "run" are available. When i use the built in getAnimationChannels() of the MD2 class, it merely returns and array of MorphChannel3D Objects as follows.
//md2 is a model that is already loaded and waiting utilizing the given events for such.
trace(_md2.getAnimationChannels()); //returns [object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D],[object MorphChannel3D]
From what I have seen in my own searches, this should be returning an array of the channel names in String form. I attempted to extract properties from the MorphChannel3D Object with no success using for each(var p:* in Object);
Where am I going wrong, and how can I obtain the name of the animation channels so that I may call them at will?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
有趣的项目。
我玩了一下 MD2,但我很困惑。 不知道要使用什么类以及如何使用。 我询问了 papervision 邮件列表上的人,但没有明确的答案。
这是我的测试,
这是几个月前创建的,因此检查更新可能值得。 在我的测试中,事情是手动完成的。 我记得在 ascollada 网站上看到过一些不错的演示,但从未有机会看到它们是如何实现的md2动画。
希望这可以帮助。
Interesting project.
I played with MD2 a bit, but I got confused. Didn't know what classes to use and how. I asked the guys on the papervision mailing list, but no clear answers.
Here is my test
This was created a few months ago, so it might be worth while checking for updates. In my test, things are done a bit manually. I remember seeing some nice demos on the ascollada website, but never had the chance to see how they implemented md2 animation.
Hope this helps.