Away3D 3.6 MovieMaterial 可能存在错误;当 Interactive=true 时,二维叠加出现在模型上
我在 Away3D 3.6 中遇到了 MovieMaterial.as 的特殊问题。
我有一个 3D 地球仪,上面有可点击的白色热点(见下图)。当我在以下代码中将交互设置为“true”时,当我将鼠标移到地球表面上时,MovieMaterial 的 2D 副本将突然出现(请参见底部的图像)。当我移动鼠标时,这个 2D 图像也会移动。
_hotspotGlobeMaterial = new MovieMaterial( _hotspotSprite, { interactive: true, smooth: true, transparent: true } );
_hotspotGlobe.material = _hotspotGlobeMaterial;
http://grandinteractive.com/misc/GlobeWithHotspots.png
这里的 2D 问题:
您将还注意到白色/透明区域颠倒了。
I am having a peculiar issue with MovieMaterial.as in Away3D 3.6.
I have a 3D globe with clickable, white hotspots on it (see image below). When I set interactive to 'true' in the following code, when I move my mouse over the globe's surface, a 2D copy of the MovieMaterial will suddenly appear (see image at bottom). This 2D image will move when I move my mouse too.
_hotspotGlobeMaterial = new MovieMaterial( _hotspotSprite, { interactive: true, smooth: true, transparent: true } );
_hotspotGlobe.material = _hotspotGlobeMaterial;
http://grandinteractive.com/misc/GlobeWithHotspots.png
The 2D issue here:
You'll also noticed that the white / transparent areas are reversed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Away3D 3.6 创建一个不可见的精灵,出现在您的 3D 对象上。 3D 精灵包含的是 MovieMaterial 的副本,它基本上是作为使子项可点击的一种手段。聪明的!
它在我的例子中显示的原因是因为我在代码中的很多地方设置了blendMode = BlendMode.LAYER,从而使不可见的精灵可见。谁会想到呢?
Away3D 3.6 creates an invisible Sprite that appears over your 3D object. The 3D sprite contains is a copy of your MovieMaterial and it basically operates as a means of making the children clickable. Clever!
The reason that it was showing in my case was because I had set blendMode = BlendMode.LAYER in a bunch of places in my code, thus making the invisible sprite visible. Who would have thought?