【问题标题】:In Aframe, the target is not working for Light Spot在 Aframe 中,目标不适用于 Light Spot
【发布时间】:2022-11-06 18:13:29
【问题描述】:

我想将聚光灯指向特定对象。根据文档 (https://aframe.io/docs/1.3.0/components/light.html)

有一个属性目标,它接受要指向的对象的 id。然而,目标似乎对任何值都没有反应。

<a-light position="10 10 10" rotation="0 0 0" scale="1 1 1" light="type:spot;color:#ff0000;intensity:100;distance:1000;decay:0.1;angle:3;penumbra:0; target:myplane"></a-light>

这是我的代码笔示例:

https://codepen.io/jimver04/pen/JjZRJLz

【问题讨论】:

    标签: aframe


    【解决方案1】:

    我找到了,它只需要在飞机 ID 前加一个#

    <a-light position="10 10 10" rotation="0 0 0" scale="1 1 1" light="type:spot;color:#ff0000;intensity:100;distance:1000;decay:0.1;angle:3;penumbra:0;target:#myplane"></a-light>

    【讨论】:

      猜你喜欢
      • 2018-03-20
      • 1970-01-01
      • 1970-01-01
      • 2021-11-16
      • 2019-10-06
      • 1970-01-01
      • 2019-08-12
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多