Aframe envMap不适用于第一个原语 [英] Aframe envMap not applying to first primitive
问题描述
三次envMap似乎跳过了它应用于的第一个对象。引用相同映射的后续对象也可以。在HTML中对对象重新排序仍然会导致首先被跳过。在空间中重新排序没有效果。
A cubic envMap seems to skip the first object it's applied to. Subsequent objects referencing the same map are fine. Reordering the objects in the HTML still results in which ever is first being skipped. Reordering in space has no effect.
https://github.com/scottmsinger/aframe/tree/master/tests/env_map_order
推荐答案
您的cubemap标签缺少结束标签。 可能弄乱了下一个标记的解释,从而导致了问题。
Your cubemap tag is missing a close tag. That might be messing with the interpretation of the nextmost tag, causing the issue.
<a-assets>
<a-cubemap id="sky">
...
</a-cubemap> <-- Make sure to add this tag
</a-assets>
如果您选择的html / xml编辑器没有对此发出警告,我建议您切换到其他编辑器,因为它将节省大量调试时间。甚至JSFiddle这样的快速在线工具也会突出显示XML标签不匹配。
If your html/xml editor of choice didn't warn you about this, I'd advice you to switch to a different editor, as it will save you a lot of debugging time. Even quick online tools like JSFiddle highlight XML tag mismatches.
这篇关于Aframe envMap不适用于第一个原语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!