首页 > 解决方案 > 我使用 a-frame 将纹理应用到平面,但什么也没有出现

问题描述

我从 A-Frame 开始。我按照教程将纹理分配给平面。什么都没有出现,只是一架黑色的飞机。那可能会发生吗?在此先感谢我的代码如下:

<html>
  <head>
    <meta charset="utf-8" />
    <title>Hello, WebVR! • A-Frame</title>
    <meta name="description" content="Hello, WebVR! • A-Frame" />
    <script src="https://aframe.io/releases/1.2.0/aframe.min.js"></script>
  </head>
  <body>
    <a-scene>
      <a-assets>
        <img id="suelonormal" src="img/textura-suelo-normal.png" />
        <img id="suelo" src="img/textura-suelo.png" />
      </a-assets>

      <!--
      <a-plane
        material="color:white"
        rotation="-90"
        scale="15 15 1"
        repeat="5 5 1"
        src="#suelo"
        normal-map="#suelonormal"
        normal-texture-repeat="5 5 1"
      >
      </a-plane>
      -->
      <a-plane
        material="src:#suelo;repeat:5 5 1;normal-map:#suelonormal;normal-texture-repeat:5 5 1"
        rotation="-90"
        scale="15 15 1"
      >
      </a-plane>
      <a-sky color="blue"></a-sky>
    </a-scene>
  </body>
</html>``` 
thank you in advance

标签: texturesaframeplane

解决方案


我发现了问题:纹理文件太重。还是非常感谢


推荐阅读