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

How do I apply cubemaps textures to cylinders in A-frame?

我正在尝试将不同的图像应用于圆柱体的各个侧面。我已尝试使用 here 所述的立方体贴图方法,但它不起作用。这应该有效吗?还是有另一种方法可以将多个图像添加到此形状?最好了解如何将不同的图像添加到各种形状的不同侧面,或者这是否只适用于立方体? 这是我正在尝试的;

<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,如果有帮助,我可以 post 这里

感谢您的帮助

尝试https://github.com/bryik/aframe-cubemap-component

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