Aframe 如何将立方体贴图纹理应用于A帧中的圆柱体?

Aframe 如何将立方体贴图纹理应用于A帧中的圆柱体?,aframe,webvr,Aframe,Webvr,我试图将不同的图像应用到圆柱体的不同侧面。我尝试过使用前面描述的cubemap方法,但它不起作用。这真的管用吗?或者是否有其他方法将多个图像添加到此形状?了解如何将不同的图像添加到不同形状的不同侧面会很好,或者这仅适用于立方体? 这就是我正在尝试的 <html> <head> <title>example</title> <meta name="description" content="Hello, WebVR! - A-F

我试图将不同的图像应用到圆柱体的不同侧面。我尝试过使用前面描述的cubemap方法,但它不起作用。这真的管用吗?或者是否有其他方法将多个图像添加到此形状?了解如何将不同的图像添加到不同形状的不同侧面会很好,或者这仅适用于立方体? 这就是我正在尝试的

<html>
<head>
    <title>example</title>
    <meta name="description" content="Hello, WebVR! - A-Frame">
    <script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
    <script src="https://unpkg.com/aframe-template-component@^3.1.1/dist/aframe-template-component.min.js"></script>
</head>
<body>
    <a-scene>
        <a-assets>
                 <a-cubemap id="wheel">
                    <img src="https://www.nickritchie.co.uk/samples/tyre.png">
                    <img src="https://www.nickritchie.co.uk/samples/tyre.png">
                    <img src="https://www.nickritchie.co.uk/samples/wheel.jpg">
                    <img src="https://www.nickritchie.co.uk/samples/wheel.jpg">
                    <img src="https://www.nickritchie.co.uk/samples/tyre.png">
                    <img src="https://www.nickritchie.co.uk/samples/tyre.png">
                  </a-cubemap>
                <script id="example" type="text/html">
                        <a-entity
                            geometry="primitive: cylinder; radius: 0.25; height: 2"
                            position="0 1 -4"
                            rotation="0 0 90"
                            material="envMap: #wheel">
                        </a-entity> 
                </script>
        </a-assets>
        <a-entity 
            template="src: #example">
        </a-entity>
        <a-plane 
            position="0 0 -4" 
            rotation="-90 0 0" 
            width="4"
            height="4" 
            shadow 
            color="yellow">
            </a-plane>
          <a-sky 
            color="grey">
            </a-sky>
          <a-camera>
          </a-camera>
    </a-scene>
</body>

</html>

例子
错误来自three.js,如果有帮助,我可以在这里发布

谢谢你的帮助

试试看


  <a-entity cubemap="folder: https://www.nickritchie.co.uk/samples/"></a-entity>