首页 > 解决方案 > 如何在 A-Frame 中的图像后面放一盏灯?

问题描述

我想用一种光晕创建图像,就像房地产窗户上的图像和 LED 我尝试了灯光,材料,但因为它是一个盒子,所以我做的事情的 4 面都有图像不想感谢您的帮助,这是我自使用框架 A-Frame 以来所做的

<a-scene>
  <a-assets>
    <img id="tex1" src="https://image.freepik.com/free-vector/modern-abstract-background_1048-1003.jpg">
    <img id="tex2" src="https://static.vecteezy.com/system/resources/previews/000/108/621/original/blue-grunge-free-vector-texture.jpg">
    <img id="tex3" src="https://lh3.googleusercontent.com/mCVsAtG1EpSwbaGIkSo1v2WFkwKG_khaAz0iP9F3uuDkxzfYarKAfIIJVuq0FfiC7gCLu5cP=s640-h400-e365">
    <img id="tex4" src="https://static.vecteezy.com/system/resources/previews/000/094/491/non_2x/polygonal-texture-background-vector.jpg">
    <img id="sotheby" src="sotheby.PNG">
  </a-assets>
  
  <!-- <a-box position="-2 -1 -5"  width="2" height="2" depth="2" src = "#tex1" ></a-box>
  
  <a-box position="0.5 -1 -5"  width="2" height="2" depth="2" src = "#tex2">
  <a-animation attribute="rotation" begin="click" repeat="0" to="0 360 0"></a-animation>
  </a-box>
  
  <a-box position="-2 1.5 -5"  width="2" height="2" depth="2" src = "#tex3"></a-box>
  <a-entity light="color: #AFA; intensity: 1.5" position="0.5 -1 -5"></a-entity>
  
  <a-box position="0.5 1.5 -5"  width="2" height="2" depth="2" src = "#tex4"></a-box>
   
  <a-image position="-2 1.5  -3.95"  width="1.3" height="1" depth="2"  src="sotheby.PNG"></a-image>
 --><a-scene>
  <a-assets>
    <img id="my-texture" src="sotheby.PNG">
  </a-assets>

  <a-entity geometry="primitive: box" material="src: #my-texture; repeat:0 0"  ></a-entity>
</a-scene>

  <a-sky color="#fff"></a-sky>
  <a-camera position="0 1.8 0">
    <a-cursor color="#2E3A87"></a-cursor>
  </a-camera>
  

标签: aframe

解决方案


推荐阅读